Detect when record has finished loading (1 Viewer)

PeterWieland

Registered User.
Local time
Today, 11:48
Joined
Sep 20, 2000
Messages
74
I am using DoCmd.GoToRecord to return a single record from around 300,000. Depending on where the record is the time taken to retrieve the record varies. If the code is allowed to continue, I get errors as the data is not ready. At the moment I use a timed delay to wait for the record to load, but that is not very elegant.

Is there a way to detect when the record has finished loading?
 

RuralGuy

AWF VIP
Local time
Today, 04:48
Joined
Jul 2, 2005
Messages
13,826
Have you tried setting a success flag in the Current event of the form and then looping your code on DoEvents until the flag is set?
 

PeterWieland

Registered User.
Local time
Today, 11:48
Joined
Sep 20, 2000
Messages
74
Thanks RuralGuy, that did the trick!
 

Users who are viewing this thread

Top Bottom