Sort by text

A

abigiggle

I am a novice to Access : is it possible to sort a database of education
establishments by creating a query that will find only schools containing the
text "primary" or "junior"
 
D

Dale Fye

Yes.

1. Create a new query and add the table you want to query.
2. Add the fields from that table that you want in your final output
3. In the criteria row of the field you want to search type:

Like "*primary*" OR Like "*junior*"

The Like operator tells the JET engine to identify those records where the
word 'primary' or 'junior' shows up anywhere in that field. It is the wild
card character '*' in front and behind these words that causes the db to look
anywhere in the field. If you used "primary*", it would only return those
values where 'primary' is at the beginning of the text. The other wild card
character you might need is the '?'. When used in conjunction with a word,
this represents a single character (any character). For example:

Like "primary??" would only return those records where the text length is 9
characters long and starts with 'primary'.
 
A

abigiggle via AccessMonster.com

Hi Dale, thanks for that, what criteria would i use to sort the data to
exclude the text "Primary" or "Junior"
Abigiggle
 

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