Passing Criteria From a Form

K

Kevin D.

I have a Query named qryZipCode based on tblZipCodes which looks up the City
and State for a certain Zip Code. The criteria for the "ZipCode" field is
passed from frmAttendeesAll using the following:
[Forms]![frmAttendeesAll]![Zip]. Is there a way to code the criteria to only
consider the first 5 digits passed for the zip code from the form, such that
if the zip code passed is 12208-2115, the query would only use 12208 for the
criteria?

Thanks in advance for your help.

Kevin D>
 
J

Jeff Boyce

Left([Forms]![frmAttendeesAll]![Zip],5)

Regards

Jeff Boyce
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top