Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

MS Access Query not returning blank fields


(!)

mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 09:48 AM #1
MS Access Query not returning blank fields
I have a query that has a couple of text fields where in the criteria I put <>"Power". When I put this criteria in, it also does not show me records that the field is blank. If I leave the criteria empty, it shows me all records including the records with the blank fields. How do I get the query to exclude the criteria Power but still show records where that field is blank?
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 10:13 AM #2
How many Tables in the query?
Albantar's Avatar
Albantar Albantar is offline Albantar has a Profile Picture
Computer Specs
Member with 95 posts.
 
Join Date: Dec 2008
Location: Netherlands
Experience: Advanced
28-Jan-2009, 10:17 AM #3
Try adding something like:

OR ... = ""
mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 10:55 AM #4
I have 4 tables and when I try or ="" I get even less records
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 11:10 AM #5
Yes you would. You may not be getting the Null Fields due to the Join Settings between the Tables.
Can you post a Screenshot of the Query in Design View?
slurpee55's Avatar
Computer Specs
Member with 7,837 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
28-Jan-2009, 11:11 AM #6
Set 2 criteria
Is Null
and below it in the Or line
<>"Power"
(You can reverse the order, just have them both in.)
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 11:17 AM #7
slurpee, that does the same as Albantar's suggestion, it excludes everything else but Is Null.
mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 11:58 AM #8
I tried that but it pulls everything even outside my date criteria. I think I am just going to dump it to excel and use a macro to delete the lines that contain Power. Thanks.
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 12:09 PM #9
mariaa, you realy should learn how to do this in Access, can you post a Screenshot of the Query in design mode?
mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 12:20 PM #10
I have attached my design view but it actually has 7 tables 4 are linked to ODBC and 3 regular tables.
Attached Thumbnails
MS Access Query not returning blank fields-designview.jpg  
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 12:45 PM #11
OK can you click on the line that Joins the Outage Table to the RootCause Table and tell me what "Option" has been selected please?
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 12:48 PM #12
maria, that looks like an 8D Problem Solving Database?
mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 01:00 PM #13
all outage and only those in root cause where join fields are equal. I don't know what a 8D DB is.
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
28-Jan-2009, 01:06 PM #14
OK, can I assume then that the Root Cause Table does not have a "Null Value" field?
From your previous remarks do you want to delete Records that do not have "Power" or No value in the Root Cause Field?
8D is a Problem Solving Technique.
mariaa33's Avatar
mariaa33 mariaa33 is offline
Member with 143 posts.
THREAD STARTER
 
Join Date: Aug 2008
Experience: Beginner+
28-Jan-2009, 01:09 PM #15
Basically I need any field that is not Power but include blank fields. So I should have records that have Card replaced, shelf replaced, <blank>, etc. just not Power.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑