L lscheer Registered User. Local time Today, 19:45 Joined Jan 20, 2000 Messages 185 Aug 23, 2002 #1 I have a table with mailing address info and I need to restrict the users from typing a comma into the City field. I tried using a validation rule, and although I get no syntax error, it doesn't work. Does anyone have any suggestions? Thx
I have a table with mailing address info and I need to restrict the users from typing a comma into the City field. I tried using a validation rule, and although I get no syntax error, it doesn't work. Does anyone have any suggestions? Thx
jimbrooking Registered User. Local time Today, 14:45 Joined Apr 28, 2001 Messages 210 Aug 25, 2002 #2 This is a cool trick I learned at : In the text box's BeforeUpdate event put the following code: If Me.tbxCity Like "*[!A-Za-z ]*" Then MsgBox "Non-alpha character discovered in City name" Cancel = -1 End If The code as written will allow upper- and lower-case letters and spaces to accommodate city names like "New York". If you don't want to allow spaces, remove the space after the "z". Jim
This is a cool trick I learned at : In the text box's BeforeUpdate event put the following code: If Me.tbxCity Like "*[!A-Za-z ]*" Then MsgBox "Non-alpha character discovered in City name" Cancel = -1 End If The code as written will allow upper- and lower-case letters and spaces to accommodate city names like "New York". If you don't want to allow spaces, remove the space after the "z". Jim
L lscheer Registered User. Local time Today, 19:45 Joined Jan 20, 2000 Messages 185 Aug 26, 2002 #3 Thanks, i'll try it...