Search Criteria In Access Query

  • Thread starter Thread starter cstraim
  • Start date Start date
C

cstraim

Hey there All

I am looking to find records that contain a capital E as the last
character in a field

Here is a sample of the data for the "status Field

Status

cd rom E
dep summary
script
weekly E
xmit ROL
web page 16
Monthly E

This query should pull up all of those records that have an E at the
end. So the results of this query would be

Status

cd rom E
weekly E
Monthly E

Can someone help with the syntax for he criteria in this query.

Thanks
 
TRY the following

Field: Status
Criteria: LIKE "*E"

Check out "wildcard" in the local help.
 
Add another output field to the query design view grid like this --
Expr1: Asc(Right([Status],1))

Use a criteria of 69 as this is the ASCII code for a capital E.
 
Thanks all

The Wildcard worked. I was using a % instead of a * in my query (I got
the percent from Microsoft Query in Excel.)

Thanks again :)
 
Actually, if you need to match Upper Case E as the last character, my
proposed solution will give you an incorrect result as it will match "e"
also. If your data source is a link to an Excel sheet, then I think you may
be OK (the ISAM for that seems to be case-sensitive).
 
Back
Top