Percent Question

LLB

Registered User.
Local time
Today, 14:21
Joined
Jan 19, 2004
Messages
48
I did a search and discovered how to show percent properly.

Being:

Private Sub Box1Percentage_AfterUpdate()
Me.Box1Percentage = Me.Box1Percentage / 100
End Sub


Further to this: I have 2 percent boxes. I have Box1 defaulting to 100% and Box2 defaulting to 0%. In the event that Box1 is changed to say 80% I want Box2 to automaticly change to 20%. How would I do this. These percentages are being stored on a table.

Thanks
 
Set box 2's ControlSource to be =1-[Box1Percentage]
 
LLB said:
Me.Box1Percentage = Me.Box1Percentage / 100

I'd be careful here on the off chance your user types in a decimal.
 
Mile-O-Phile said:
Set box 2's ControlSource to be =1-[Box1Percentage]


I did try this. It displays 9900% and enters 0% on the table.
 
one minus or one hundred minus ?


And don't go trying to put the second value in the table - if you have the first one then that's enough as the second value is always calculable from the first.
 

Users who are viewing this thread

Back
Top Bottom