Query for Specific Information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a query that will pull specific information from my
field .. for example I have different schools in my field .. Sunshine
Elementary, Sunshine Middle, Sunshine High .. if I want to do a query to pull
ONLY my Elementary schools .. how do I tell my query that? ..

Thanks in advance to all the Access Gurus out there!! :) ..
 
This one will be tricky because you might have to do some string manipulation
which might change every time you enter a new school.

My advice would be to normalize a little more because the options you
mention should be in a seperate table called Type (Elementary, middle, high).
When done you can easily query for middle, high and elementary. The situation
you are in know requires right strings to count the number of characters and
then comparing if those charachters equal "middle"...
 
As long as the school name has the word Elementary in it, you can use like
criteria to identify the schools

Field: SchoolName
Criteria: Like "*Elementary*"

In certain versions of data storage you may need to change that to
Field: SchoolName
Criteria: Like "%Elementary%"

Obviously, you would be better off if you had a field to store the
SchoolLevel. Then you wouldn't be relying on someone to correctly type the
school name and not enter something like Sunshine HS instead of Sunshine
High School. Or Sunshine Grade School instead of Sunshine Elementary or
just mistyping Sunshine Elmentary
--
John Spencer
Access MVP 2002-2005, 2007
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

Back
Top