validate field entry

virencm

Registered User.
Local time
Tomorrow, 07:44
Joined
Nov 13, 2009
Messages
61
hi

I have a field with data type "number". i need to always validate that the first number entered is a 7,if not an error message. any help would be great.

cheers

Viren
 
Look at "DemoValidate7A2000.mdb" (attachment, zip).
Open form and try. Look at VBA.
 

Attachments

Use the After Update event of the text box with something like this...

Code:
if left(YourTextBoxName,1) <> 7 then
   msgbox "value does not begin with a 7!"
   me.YourTextBoxName.undo
   me.YourTextBoxName.setfocus
end if
 

Users who are viewing this thread

Back
Top Bottom