Query to sort portion of field

jamiesuperman420

Registered User.
Local time
Yesterday, 21:48
Joined
Nov 20, 2008
Messages
43
Hello!! I'm making a database that primarily uses Codes (eg: CD12, CD81, MILAN01, MILAN02, etc, etc) and I'm wondering:

What's the best way to go about making a query to group all the codes beginning with CD, or all the codes beginning with MILAN, etc, etc?? Is there some sort of "Contains" expression I could have - so the user types in "MILAN" and then it returns all the properties with MILAN in the Code??

Thank you!!
 
Hi -

Lookup the InStr() function in the Help File.

Try placing this in the query's criteria cell of your Code field:

InStr([MyCode], "Milan")>0

.replacing the field name as necessary. This will return all rows containing "Milan" in the specified field.

HTH - Bob
 
Fantastic!! That helped a lot and I have it going now!! I really appreciate it!!
 
(and I love exclamation points - I feel I used too many and it devalues them - but I really do appreciate it, I'm just really excited that it's working now)
 
Love it when a plan comes together!

Glad it helped.


Best wishes, Bob
 

Users who are viewing this thread

Back
Top Bottom