Form to show progression

bjreb

Registered User.
Local time
Today, 21:05
Joined
May 7, 2001
Messages
37
I have a vba function running and would like to have a form show and tell what part of the module is running. It would then update when the next part of the module is run.

Ex.

Start
Form: Starting
looking for stuff
Form:Looking for stuff
Found stuff
Form:found stuff

And so on.

Please help

Thanks
Andy
 
Here's a link to some Progress Bars:
http://home.bendbroadband.com/conradsystems/accessjunkie/progressbars.html

You could also use the Status bar at the bottom to display your messages:
'Application.SetOption "Show Status Bar", True - Turn on Status Bar
'SysCmd acSysCmdSetStatus, "Looking for Stuff!" - Show stuff on Status Bar
'SysCmd acSysCmdClearStatus - Clear the Status Bar
'Application.SetOption "Show Status Bar", False - Turn off the Status Bar

The Status Bar has a Progress Meter also.
 
You can simply do this using a Dialog form. Just create a Sub routine to change the text on the form. You have to manually place the sub where you want it to display.

Example:

Code:
Public Sub ChangeFormText(strText As String)
    Forms("Form Name").txtMessage.Value = strText
    Forms("Form Name").Refresh
End Sub

In your code just call it with:
Code:
Call ChangeFormText("Looking For Stuff")
... looking for stuff code ...
Call ChangeFormText("Found Stuff")
DoCmd.Close acForm, "Form Name"
 
Thank you, one more thing

I have the form and it will open but how to keep the form open but keep the vba running behind it. As soon as the window opens the code stops

Thanks
 
how about calling the code in the form timer? set the interval to 500 and it will update every half second. not the neatest solution, but it works, and avoids having to check updates etc
 
Thank You all

I figured it out. I was opening the form as a dialog. I did not know that it was modal. Once i figured out that was the problem and change the for to normal it worked like a charm

Andy
 

Users who are viewing this thread

Back
Top Bottom