What you are asking to do is to divide the field by 100 if the user entered
a value with no decimal point. Use the AfterUpdate event of the text box to
search the Text property of the text box for the dot. If not found, divide
by 100.
You probably need to do this in lots of text boxes, so paste the function
below into a general module. Then set the AfterUpdate property of the text
box named "Amount" to:
=MakeCurrency([Amount])
and so on.
Function MakeCurrency(txt As TextBox)
If IsNumeric(txt.Value) Then
If InStr(txt.Text, ".") = 0 Then
txt.Value = txt.Value / 100
End If
End If
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
ctdak said:
I have a dollar entry field in my accounting-related application. Normal
fast data entry practice calls for entering 5510 for 55.10 (no decimal
entered). Is there a way to allow this? Right now my data type is Currency
and format is Standard, but if you enter 5510 you get 5510.00 instead of
55.10 when leaving the field.