Hi, I would like to know what do I set the Number field to in property sect. I want double diget only and 2 decimel places only, eg 25.44. Thanks
[/FONT]
[FONT=Courier New]Sub test101()
Dim ccc As String
ccc = 12.55
If ccc Like "*.*" And Len(ccc) = 5 Then
MsgBox "ok"
Else
MsgBox "not okay"
End If
End Sub[/FONT]
[FONT=Courier New]
If the dats is numeric then you really should be using numeric data types.'m new myself to access, tried looking here and there but I see no option to set the property type to the way you want.
However if you;re updating numbers from form maybe you can try
something like this
Code:[FONT=Courier New]Sub test101() Dim ccc As String ccc = 12.55 If ccc Like "*.*" And Len(ccc) = 5 Then MsgBox "ok" Else MsgBox "not okay" End If End Sub[/FONT]
If ccc Like "*.*" And Len(ccc) = 5 Then
? "1234." Like "*.*" and Len("1234.") = 5
True
? ".1234" Like "*.*" and Len(".1234") = 5
True