I only want a user to enter either a number, decimal point, or negative operator in the the first three positions in the control.
This is the code I used:
Dim MyNumber
MyNumber = Left(FieldName, 3)
If MyNumber = "A through Z" Then
MsgBox "Non-numeric characters are not allowed in this positon. Please enter value again."
FieldName.Value.Reset
FieldName.SetFocus
Exit Sub
End If
I'm having problems with the line:
If MyNumber = "A through Z"
I don't know how to define the range in code for saying any letter from a through z. Or to define a way for the user to not enter anything other than a number, negative operator (-), or a decimal point (.).
Can anyone help me out with this?
[This message has been edited by JennJenn (edited 05-31-2002).]
Thanks David (Access Expert). You're good!!
[This message has been edited by JennJenn (edited 05-31-2002).]
This is the code I used:
Dim MyNumber
MyNumber = Left(FieldName, 3)
If MyNumber = "A through Z" Then
MsgBox "Non-numeric characters are not allowed in this positon. Please enter value again."
FieldName.Value.Reset
FieldName.SetFocus
Exit Sub
End If
I'm having problems with the line:
If MyNumber = "A through Z"
I don't know how to define the range in code for saying any letter from a through z. Or to define a way for the user to not enter anything other than a number, negative operator (-), or a decimal point (.).
Can anyone help me out with this?
[This message has been edited by JennJenn (edited 05-31-2002).]
Thanks David (Access Expert). You're good!!
[This message has been edited by JennJenn (edited 05-31-2002).]