Connecting Tech Pros Worldwide Forums | Help | Site Map

Access vba : to display time left when code is running

atksamy's Avatar
Member
 
Join Date: Oct 2008
Posts: 82
#1: Dec 3 '08
Hi,

I have a form with a few buttons which execute code when pressed like running validations on the database. some of these code could could run for a few minutes so is there any way to show the time remaining or a message to display the % of process completed.

or pop out a message when code evaluation starts and the message should disappear once code running is completed

thanks

Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,176
#2: Dec 3 '08

re: Access vba : to display time left when code is running


You could do a
docmd.openform "little form that has a message"
run code
docmd.close acform, "little form that has a message"

I made a form with a line of text boxes and a timer event that changes the background color so that it looks like one box is moving across the form over and over again, letting the user know that it's still going. The only problem is you have to call DoEvents frequently enough in the code that is running for it to process the OnTimer event. Otherwise you can just have a static message.
Reply

Tags
ms access, vba