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

filtering from input question

Status
Not open for further replies.

boofayah

Technical User
Feb 13, 2005
5
0
0
CA
I'm trying to filter by input from an access table. I want to filter only correct postal code formats which is "letter number letter space number letter number". I tried "?#? #?#", but the question mark allows numbers as well for some reason so 11L 1L1 passes the filter which it shouldn't. Also tried "[a-z]#[a-z] #[a-z]#" but it gives error "operator without operand"

Any help is appreciated.
 
I tried the following

Like "[a-z]#[a-z] #[a-z]#"

and it works as it should.

Make sure 'Like' is included and don't forget the double quotes.

John Borges
 
If the above still gives you errors, then you have to encapsulate the quotes...

Like """[a-z]#[a-z] #[a-z]#"""
 
Something like this ?
Like '[a-z]#[a-z] #[a-z]#'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you. I didn't have the operator "Like" so it wasn't working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top