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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Validation, don't allow # symbol

Status
Not open for further replies.

Dryheat

Technical User
Oct 18, 2004
62
US
I am working in Access 2002 and I'm trying to create a validation rule for a text field in one of my tables. I need to prevent users from entering the '#' symbol as part of the customer name. Here's what I've found:
Code:
Not Like "*" &Chr(33)
This one works and prevents users from entering the '!' symbol in this field

Code:
Not Like "*" &Chr(35)
This one does something unexpected. Instead of preventing users from entering the '#' symbol it is preventing them from entering any numeric characters.

Please let me know if you have a solution.

Dry :)
 
You can include the hash in braces:

Not Like "*" & "[#]
 
AWESOME, that did the trick. Thanks for the quick reply.

Dry :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top