Solved

Retrieve Nulls in an Access query

Posted on 2014-09-30
1
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

635 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