V virencm Registered User. Local time Tomorrow, 07:44 Joined Nov 13, 2009 Messages 61 Apr 1, 2010 #1 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
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
M MStef Registered User. Local time Today, 20:44 Joined Oct 28, 2004 Messages 2,250 Apr 1, 2010 #2 Look at "DemoValidate7A2000.mdb" (attachment, zip). Open form and try. Look at VBA. Attachments DemoValidate7A2000.zip DemoValidate7A2000.zip 11.2 KB · Views: 104
ghudson Registered User. Local time Today, 15:44 Joined Jun 8, 2002 Messages 6,193 Apr 1, 2010 #3 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
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
V virencm Registered User. Local time Tomorrow, 07:44 Joined Nov 13, 2009 Messages 61 Apr 2, 2010 #4 thank you. it works great!!!