Auto Decimal

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

Guest

When entering a numeric field is there anyway to make it so the user doesn't
have to enter the decimal? So when they enter 23.45 they only have to enter
2345 and the system will place the decimal in the correct place.

Thanks for any help

Tom
 
Use the AfterUpdate event procedure of the text box to examine its Text
property, and if there is no decimal place, divide by 100.

This kind of thing:

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