text bo

peterbowles

Registered User.
Local time
Today, 12:35
Joined
Oct 11, 2002
Messages
163
Hi

i have a text box on a form Me.text1. a user enters a number Can i set the text box to only allow 4 digits to be entered

Thanks
 
put something like this in the before update event for the text box


If Len(Me.text) <> 4 or IsNumeric(Me.text) =False Then
MsgBox "Length > 4 or not digits", vbExclamation, "invalid entry"
Cancel = True
End If
 

Users who are viewing this thread

Back
Top Bottom