Save this function into a standard module (Modules tab of Database window.)
Public Function MakePercent(txt As TextBox)
If Not IsNull(txt) Then
If InStr(txt.Text, "%") = 0 Then
txt = txt / 100
End If
End If
End Function
Now you can set the AfterUpdate property of any text box to call this
function. For example, you would set the AfterUpdate property of Text23 to:
=MakePercent([Text23])
The function works by examining the Text property of the control. That's the
actual text the user typed into the control, as distinct from its Value. If
the user did not type a percent sign, the function divides the value by 100.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
esparzaone said:
one more question - the predesigned format for percentage multiplies it
by
100. How would you override that? meaning right now I enter 4 and it she
400.00% and I want it to look like 4.00% Is there a way to do this -
thanks
for all your help I am a newbie
Zenia