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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display a "Timer" in Access as SQL is running in the back?

Status
Not open for further replies.

childrenfirst

Technical User
Oct 15, 2006
80
0
0
US
Hi,

I am not sure that this can be done in Access Project... I have a search form created in Access, and when users click on a command button, the event will launch the SQL stored procedure to search for results based on the search criteria.

Search results will be returned to a different Access form.

The problem I have is that it takes 3 to 15 seconds to run the stored procedure depends on the search criteria and number of matches, and I don't want the result form to open before SQL finishes retrieving the results.

I currently use a PAUSE function created in vba, and basically made the system to stop reading the next line of vba code for 10 seconds. In this way, the result form will not be opened up before results are ready to be displayed. However, this fake solution is not perfect because SQL can finish running in less than 10 seconds, or requires more than 10 seconds to finish running.

Is there anyway to revise the my current Pause function in vba to open the result form based on the actual run-time of the SQL procedure?

Thanks a bunch!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top