How to select characters in a field?

  • Thread starter Thread starter Steel Banana
  • Start date Start date
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!
 
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
 
Back
Top