Input Mask?? for currency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I want to simplify data entry for users by supplying "the decimal point when
typing in a currency number. eg: if we want $156.45, i want the user to
type in 15645, does not need to put in the decimal.

Any ideas?

Thanks

Roger
 
You want to divide the entry by 100 if the user typed no decimal place? Use
the AfterUpdate event procedure of the text box, to examine its Text
property. The Text will not contain a "." if the user did not type one.

This kind of thing:

Private Sub Amount_AfterUpdate()
With Me.Amount
If Not IsNull(.Value) Then
If InStr(.Text ".") = 0 Then
.Value = .Value /100
End If
End If
End With
End Sub
 
Thankyou very much will try.
And thankyou for your immense help(& patience) in the programming section.
Much appreciated

Roger
 
Perfect - thanks

Allen Browne said:
You want to divide the entry by 100 if the user typed no decimal place? Use
the AfterUpdate event procedure of the text box, to examine its Text
property. The Text will not contain a "." if the user did not type one.

This kind of thing:

Private Sub Amount_AfterUpdate()
With Me.Amount
If Not IsNull(.Value) Then
If InStr(.Text ".") = 0 Then
.Value = .Value /100
End If
End If
End With
End Sub
 
Back
Top