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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to customise a progress bar

Status
Not open for further replies.

OC2

IS-IT--Management
Apr 2, 2001
59
SG
Hi,

I understand Access has an inbuilt Progress bar function using sys cmd, but I would quite like to design my own. Can any one help me with the code needed to do this.

As its custom build i only need it to count upto 20, using boxes as the measurement.
thx
 
dim i as integer
dim iMax as integer

iMax=20
me.prbProgressbar.max=iMax
me.prbProgressbar=0
do
i=i+1
me.prbProgressbar.value=i
'Update progressbar label
me.lblProgressbar.caption=format(i/iMax,"0.00") & "%"
me.repaint 'It's needed for change of Progressbar label
'Do your procedure
.....

loop

Aivars
 
Hi thx for the response.

I cannot however get the .max and .caption functions to work. Do I need to add a specific reference to include them? also is this on the onclick command or after update etc?
Im pretty new to access so your help is much apprieciated
thx
 
Access 2000
DAO360.DLL (C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll)
mscomctl.ocx (C:\...SysDir\MSCOMCTL.OCX

Access 97
DAO350.DLL (C:\Program Files\Common Files\Microsoft Shared\DAO\dao350.dll)
COMCTL32.OCX (C:\...SysDir\COMCTL32.OCX)

Aivars
 
Hi,

Ive loaded these into my library, buy i cannot
get the me.prbprogressbar to have the .max after it.

i can however do it by doing

"set test as new mscomctlib.progressbar"

this does not help the situation :)

I tried to do

with test

me.prbprogressbar.max

end with

that did not work either

could you pls assist?
thx
 
Mybe you chose wrong control from toolbox? Choose "Microsoft ProgressBar Control ???????", put it into form. Then name progressbar control as e.g. prbProgressBar.

Aivars
 
Im now on the same wave length. hehe didnt realise there were so many controls.
I was making it with a box hehe.

Cheers for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top