W
Wendymel
I am trying format a numeric field as percent. My problem is similar to the
posting "Format number field to show percent" by "Kalen" posetd on 1/23/2009.
I have a numeric field named PROJPercComp. I have formatted it as percent
with 0 decimal places.
I want the numbers entered by the user in this field to show as anything
from 1% to 100%. No decimals.
This field is used in a form called frmProjectEntry. It is bound as a source
to a text box called PercCompleted. I used the code suggested by Clifford
Bass in the above mentioned posting. It is:
If Not IsNull(controlname) And Right(controlname, 1) <> "%" Then
controlname = controlname / 100
End If
My version of the After Update code looks like:
If Not IsNull(PercCompleted) And Right(PercCompleted, 1) <> "%" Then
PercCompleted = PercCompleted / 100
End If
What is happening is that if the user enters a number of 50 or less, the
value in the field defaults to 0%. It the user enters a number of 51 to 100
then the value in the field defaults to 100%.
I just want the values to be as entered. No decimals, no rounding. If a
user enters a value of 42 then I want the field to read 42% etc.
Please help!
Thanks,
Wendy
posting "Format number field to show percent" by "Kalen" posetd on 1/23/2009.
I have a numeric field named PROJPercComp. I have formatted it as percent
with 0 decimal places.
I want the numbers entered by the user in this field to show as anything
from 1% to 100%. No decimals.
This field is used in a form called frmProjectEntry. It is bound as a source
to a text box called PercCompleted. I used the code suggested by Clifford
Bass in the above mentioned posting. It is:
If Not IsNull(controlname) And Right(controlname, 1) <> "%" Then
controlname = controlname / 100
End If
My version of the After Update code looks like:
If Not IsNull(PercCompleted) And Right(PercCompleted, 1) <> "%" Then
PercCompleted = PercCompleted / 100
End If
What is happening is that if the user enters a number of 50 or less, the
value in the field defaults to 0%. It the user enters a number of 51 to 100
then the value in the field defaults to 100%.
I just want the values to be as entered. No decimals, no rounding. If a
user enters a value of 42 then I want the field to read 42% etc.
Please help!
Thanks,
Wendy