Criteria

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

My question is quite simple, but I cannot find the
answer. When I am doing a query and I want the criteria
to be "any record that contains data in that particular
field (no matter what it is) what is the code. To
clarify, I may have a field called Special Education. It
may have different data in each record or the field may
be empty. I only want those records that actually have
data in it.

Also, is there a simple place to look up these "codes".

THANKS TO ANYONE WHO RESPONDS.

Bonnie
 
In Design View for your query, insert the following:

is not null

in the Criteria: row in the column for your field, Special Education


hth,
 
Dear Bonnie:

There are potentially two kinds of "empty" which are hard to
distinguish when just looking at a form, report, or datasheet.

One is where a text column has a zero length string. You can test for
this simply with:

WHERE [Special Education] <> ""

In the design grid, you can just put:

<> ""

in the criterion.

The other case can apply to all data types. This is the case called
"null" and is a case where there is no value. Value not specified.

This looks just like the zero length string, but it is a special case.

To test for this, use:

WHERE [Special Education] IS NOT NULL

or just type IS NOT NULL in the criterion.

It is possible to test for both in a simple fashion:

WHERE Nz([Special Education], "") <> ""

The topic of what NULL means, when you will find it, and how to handle
it is worth a bit of study. This is a very important element if
databases.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
My question is quite simple, but I cannot find the
answer. When I am doing a query and I want the criteria
to be "any record that contains data in that particular
field (no matter what it is) what is the code. To
clarify, I may have a field called Special Education. It
may have different data in each record or the field may
be empty. I only want those records that actually have
data in it.

Also, is there a simple place to look up these "codes".

THANKS TO ANYONE WHO RESPONDS.

Bonnie

Bonnie,
As criteria for that field:
Is Not Null

Where to find help?
Click on Help + Answer Wizard
In the "What would you like to do?" box, type
Criteria
Click Search
I get 20 places to go for more info.

For SQL specific help, search your hard drive.
Start + Search + All Files and Folders
In the box type
SQL
You'll get many hits.
Find the one that reads (at least in Access XP),
JetSQL35.hlp
and/or..
JetSQL40.chm
Double-click it to open it.
Your version may be a different name, but you should have it.

Here are a couple of web site also:
http://www.devguru.com/Technologies/jetsql/quickref/jet_sql_list.html
http://www.w3schools.com/sql/default.asp

Have fun.
 
Back
Top