Solved

Retrieve Nulls in an Access query

Posted on 2014-09-30
1
188 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 39

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

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…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

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