Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validating a field in a form

Status
Not open for further replies.

354688

Instructor
May 5, 2001
7
0
0
GB
How do I validate a field in a form, that contains five characters, to see if the last character entered is an "i" . If this condition is true then I wish to skip the next field and enter date into the next field afterwards.
 
You could probably use an Input mask and Validation, but I prefer to use the Before Update event 'cos it gives more control...eg:

If Not Right(Me![Text1], 5) = "I" Then
MsgBox "Put the right information in you dozy $%^&!"
DoCmd.CancelEvent
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top