childrenfirst
Technical User
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!!
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!!