UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Calculate Distance, Access 2000    
 
   
payfast8898
post Dec 7 2017, 05:36 PM
Post#1



Posts: 120
Joined: 23-April 15



have an issue with this calculating distance mdb. it works fine calculating distance and time and line by line directions but it seems not to clear the cache or something because on the line by line directions it keeps adding the previous request after the first one. when I go into the database for the first time it works great. if I close the form it doesn't refresh it just closing the whole mdb and going back in.
if someone could look at it and help me out would be great thank you.

Attached File(s)
Attached File  CalculateDistance2000.zip ( 57.5K )Number of downloads: 5
Attached File  calclateDistance.PNG ( 29.63K )Number of downloads: 2
Attached File  calclateDistance2.PNG ( 38.08K )Number of downloads: 3
 
Go to the top of the page
 
theDBguy
post Dec 7 2017, 05:41 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,221
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Have you tried adding something like this as the first code for your Calculate button?

Me.txtDirection = Null

Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post Dec 7 2017, 06:00 PM
Post#3



Posts: 120
Joined: 23-April 15



yes I have tried that. as I said I can close the form clear the form but nothing seems to fix it accept going out and coming back in.
Go to the top of the page
 
theDBguy
post Dec 7 2017, 06:08 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,221
Joined: 19-June 07
From: SunnySandyEggo


Oh, I see. Try using this instead:

strInstructions = ""


Scratch that. In your module, comment out all the public variables.

CODE
Option Compare Database
Const strunits = "imperial" ' imperial/metric (miles/km)
'Const strunits = "metric"

'Dim strTravelTime As String
'Dim strDistance As String
'Dim strInstructions As String
'Dim strError As String

Function getUnit()
    getUnit = strunits
End Function


Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
payfast8898
post Dec 7 2017, 09:22 PM
Post#5



Posts: 120
Joined: 23-April 15



Awesome Awesome thank you it seems to be working great!
Go to the top of the page
 
theDBguy
post Dec 7 2017, 09:35 PM
Post#6


Access Wiki and Forums Moderator
Posts: 71,221
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Glad to hear it worked for you. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    13th December 2017 - 12:34 AM