Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA code sequence of execution

Status
Not open for further replies.

vaneujl

MIS
Oct 11, 2001
10
BE
Sometimes an error occurs in my application when I open a form which is showing the records of a table.
That table has been created just before I open the form using a create table query.
It seams that the make table query execution is not completed when the user try open the form.
Is there a way to stop the code execution while a query or SQL request is not completed to avoid that problem?
Looking at the help, I found and tried DbEngine.Idle but without success.

Thanks
 
Have you tried DoEvents? Look up the example in the Help file.

Hope this works,
Rewdee
 
dear vaneujl,

please give us the code-snippet where you run the maketable-query and open the form.

it would be easier for me to think about :)

regards

Astrid
 
Dear Astrid,Reedew,

I finally used an "on error / Resume" statement to loop until the table is available in order to avoid opening the form while the query is not fully completed.

Thanks for your help,

vaneujl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top