query

P

Pass-the-reality

In my query, my field name is "Associate". For my criteria I have
[LastName]. When the query runs, I can insert a last name (Smith) into the
pop up and only those records will show. However, how do I change my
criteria to say Like"*[LastName]*" so that if the last name
stored in the table is Smithx, if I type Smith in the pop up it will show
that record.
 
G

ghetto_banjo

Like "*" & [LastName] & "*"


The above criteria will return any name that contains the string
entered. so if smith is entered, smithx will return but so will
blacksmith



If you want to only catch smith* (and not *smith) you could try: Like
[LastName] & "*" but you would have to test it.
 

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

Similar Threads

question about running a comparison query 2
Query 2
Group By Query 6
How assume wildcards in a query criteria 3
Access Dcount (multiple criteria) 3
Parameter Query 2
Set form field on double click 3
appending new records 1

Top