How to select characters in a field?

S

Steel Banana

I need to create criteria in a query. It must select records where the first
3 characters in the field are the same as 3 characters in a text box on some
form.

I'm sure this is an easy one. I've done this before...somewhere...but I
can't recall how to do it!
 
J

John Spencer

Try

Field: SomeField
Criteria: Like Left([Forms]![Name of your Form]![Name of Control],3) & "*"

SELECT ...
FROM ...
WHERE [SomeField] Like Left([Forms]![Name of Form]![Name of Control],3) & "*"


John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

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