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!

Progress meter or Counter 1

Status
Not open for further replies.

MarkRobinson

Programmer
Feb 18, 2000
112
0
0
US
I'm running a VB program in access and I want to display some kind of counter on the form showing that I'm working. Progress meter - counter - something very simple if fine.
Any suggestions?
 
I'll assume that your form is called frmYourForm.

(a) Place an unbound text control on the form. Name it txtCounter, and set its Locked Property to True and Enabled property to false.

(b) Prior to the loop in the code, initialise the counter; eg.
Forms!frmYourForm!txtCounter = 0

(c) Within the loop, incriment the counter; eg.

Forms!frmYourForm!txtCounter = Forms!frmYourForm!txtCounter + 1

(d) At the end of the loop, clear the counter; eg.
Forms!frmYourForm!txtCounter = Null

After each of the above assignments, add the following line, to ensure that the form display updates:

Forms!frmYourForm.Repaint

Alternatively, you may also find it useful to use the syscmd method, to show status information on the status line at the bottom of the screen. See Access online help for more info, and examples on how to use this.

Hope this helps,


Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Perfect!
Thanks. Sometimes the answer is so simple. I appreciate the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top