How do I include the blank fields in a Query?

K

Krazy4mytt

I'm trying to create a query in Access and want it to include everywhere
where it says "TBD" as well as the blank fields. I got it run all the "TBD"s
not the blanks. I thought I typed "null" to show the blanks under the
criteria in Design view but this seems to be wrong. Does anyone know what
needs to be typed in the criteria?
 
J

Jerry Whittle

Are you joining two or more tables together? If so open up the query in
design view and double click on the line between the two tables until a
dialog box appears. Change to #2 or #3 and see what happens.

#1 in an inner join where both tables must have a matching record. #2 is a
left join and #3 is a right join. The allow records to be returned from one
table when there isn't matching record in the other.
 
J

John Spencer

Since the field could be null or could contain a zero-length string, you can
try entering the following into the criteria "Cell".

IN ("TBD","") or Is Null


The WHERE clause if you are looking at the SQL statement would look like

WHERE [SomeField] in ("TBD","") or [SomeField] is Null

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
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

Top