Do I need to put any type of pause in the code below?

W

Walter Steadman

In the code below, does each line execute before the next begins? If not,
do I need to put some kind of command that makes it wait?

Private Sub Form_Open(Cancel As Integer)
CurrentDb.Execute "uqryStartDateCurrYear", dbFailOnError
CurrentDb.Execute "uqrySetStartDate", dbFailOnError
CurrentDb.Execute "uqryActive", dbFailOnError
CurrentDb.Execute "uqryActiveHours", dbFailOnError
CurrentDb.Execute "uqry1stsemiFalse", dbFailOnError
CurrentDb.Execute "uqry1stSemi", dbFailOnError
End Sub
 
A

Allen Browne

No pause is needed. The first query will complete execution before the next
one begins.

If you want to be able to rollback the results of the previous queries if
one of the later ones faily, you might want to wrap the entire operation in
a transaction. For a discussion and example of do that and avoid the traps,
see:
http://allenbrowne.com/ser-37.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top