Display Timer or message

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Display Timer or message

Post by Leesha »

Hi,
I have code that runs for a period of time. This is fine. I don't want a new user to think the table blew up so I'd like to have a message that appears while the code is running that gives an alert that the code may take X amount of time. I'd like the message to stay up until the code is finished and then automatically close. What is the best approach for doing this?

Thanks,
Leesha

User avatar
HansV
Administrator
Posts: 78237
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Display Timer or message

Post by HansV »

Create a small form.
Place a label on the form and set its caption to the text that you want to display.
Set the following properties for the form:
Auto Center: Yes
Auto Resize: Yes
Border Style: Dialog
Record Selectors: No
Navigation Buttons: No
Scroll Bars: Neither
Control Box: No
Popup: Yes
Modal: No

Save the form as (for example) frmMessage.

Before running the code, open the form:

DoCmd.OpenForm FormName:="frmMessage"

When the code has finished, close the form:

DoCmd.Close ObjectType:=acForm, ObjectName:="frmMessage"
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1484
Joined: 05 Feb 2010, 22:25

Re: Display Timer or message

Post by Leesha »

Perfect!!! I can handle that!

Thanks,
Leesha

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Display Timer or message

Post by Rudi »

Leesha wrote:Hi,
I have code that runs for a period of time. This is fine. I don't want a new user to think the table blew up so I'd like to have a message that appears while the code is running that gives an alert that the code may take X amount of time. I'd like the message to stay up until the code is finished and then automatically close. What is the best approach for doing this?

Thanks,
Leesha
I found this Microsoft Article on how to simulate a progress bar in a form in Access. It looks like a bit of work, but thought I'd just post it anyhow, if you would be interested... :smile:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.