Solved

Retrieve Nulls in an Access query

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

710 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