Progress Bar In Report

Z

zyus

I'm using access 2007 Tasks templates database.

In the report task assigned by to, is it possible to add/replace %complete
by "progress bar %" instead by number percentage.

Thanks
 
M

Maarkr

this function should work if you work with it...I probably got this from one
of the MVP sites but not sure where.

Public Function PctMeter(varAmt As Variant, varTotal As Variant)
Dim sngPct As Single
sngPct = varAmt / varTotal
If sngPct <= 1 Then
Me!baselbl.Caption = Int(sngPct * 100) & "%"
Me!lblmeter.Width = CLng(Me!baselbl.Width * sngPct)
Else
Me!baselbl.Caption = "Greater than 100% - Check your amounts"
Me!lblmeter.Width = CLng(Me!baselbl.Width * 1)
End If
Select Case sngPct
Case Is < 0.15
Me!lblmeter.BackColor = 255
Case Is < 0.5
Me!lblmeter.BackColor = 65535
Case Else
Me!lblmeter.BackColor = 65280
End Select
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top