help on input masks

laurat

Registered User.
Local time
Today, 08:51
Joined
Mar 21, 2002
Messages
120
I have a text field that now needs to be altered to only accept numbers. I know I can use a series of 9's in an input mask so the field will only accept numbers. The problem is the number entered will not always be the same length, soem could be on digit some could be two, some three and so on. Is there a way for me to use an input mask to allow only numbers can be entered but also allow the numbers to be all different lengths? Or is there another way to go about this problem?
 
Use the before update event of the control to trap the error
Private Sub MyField_BeforeUpdate(Cancel As Integer)
If Not IsNumeric(Me.ActiveControl) Then
Cancel = True
MsgBox " Whatever"
End If
End Sub
 
Won't zeroes do this... instead of nines, I mean.
 

Users who are viewing this thread

Back
Top Bottom