D
Dudley
I want to give an error message when a user does not enter alpha characters
only, but my code does not work.
If Type1 = 1, then the user should enter the first three letters of the town
of birth in Data1.
If Forms![Director1 John]![Director1Type1] = "1" And _
(Forms![Director1 John]![Director1Data1] < Asc("64")) And
(Forms![Director1 John]![Director1Data1] > Asc("91")) _
Or (Forms![Director1 John]![Director1Data1] < Asc("96")) And
(Forms![Director1 John]![Director1Data1] > Asc("123")) Then
fnErrorCheck = False
MsgBox "Invalid town of birth"
Exit Function
Else
fnErrorCheck = True
End If
Many thanks if anyone can help.
Dudley
only, but my code does not work.
If Type1 = 1, then the user should enter the first three letters of the town
of birth in Data1.
If Forms![Director1 John]![Director1Type1] = "1" And _
(Forms![Director1 John]![Director1Data1] < Asc("64")) And
(Forms![Director1 John]![Director1Data1] > Asc("91")) _
Or (Forms![Director1 John]![Director1Data1] < Asc("96")) And
(Forms![Director1 John]![Director1Data1] > Asc("123")) Then
fnErrorCheck = False
MsgBox "Invalid town of birth"
Exit Function
Else
fnErrorCheck = True
End If
Many thanks if anyone can help.
Dudley