Solved

Retrieve Nulls in an Access query

Posted on 2014-09-30
1
189 Views
Last Modified: 2014-09-30
I have a query pulling information from a table of 800 records.  The query has a field that is linked to a combo box with the default value of "*".  The query, when using "*", will only pull back values that are in the field.  It will not pull back Nulls in the field.  I want everything to come back when ising "*".  I tried wrapping my criteria in Nz() but that doesn't work.  It still only pulls back values that exist.  I current have this now:

Like Nz([Forms]![frm_Campus_offer_Main]![CboFunction]) & "*"

Is there a way to write the criteria to pull back everything when the combo box is "*", including nulls?
0
Comment
Question by:marku24
1 Comment
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 40352902
I prefer to build separate column:
IIF(isnull([Forms]![frm_Campus_offer_Main]![CboFunction]),True,IIF([YourField] like ([Forms]![frm_Campus_offer_Main]![CboFunction] & "*"),true, false))
with criteria: True
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question