I have an application that is used for tracking employees
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Using IIF statement with a crosstab query (2000 SR-1)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Using IIF statement with a crosstab query (2000 SR-1)
- This topic has 4 replies, 4 voices, and was last updated 22 years, 2 months ago.
AuthorTopicWSVernon-Knight
AskWoody LoungerFebruary 7, 2003 at 2:51 pm #383025Viewing 2 reply threadsAuthorReplies-
WSpatt
AskWoody LoungerFebruary 7, 2003 at 8:04 pm #651644You could try this:
WHERE tblTaskNumbers.TaskNumber Like [Forms]![frmReportPrinting]![txtTaskOrderNumber] or Forms]![frmReportPrinting]![txtTaskOrderNumber] is Null
This has appeared a few times in the last few months in this forum, I think it was MarkD who originally worked this one out.
Pat -
WScharlotte
AskWoody LoungerFebruary 8, 2003 at 1:12 am #651720All that creating a parameter does is make the query aware that it needs a value for that parameter. It doesn’t mean that the parameter can’t be null. See Pat’s post. You handle the issue of nulls in the criteria rather than in the parameter. It gets confusing, but the parameter is a property of the query, while the criteria is part of the WHERE or HAVING condition of the SQL.
-
WSMarkD
AskWoody LoungerFebruary 8, 2003 at 8:58 am #651768As Patt suggests you can use OR criteria to test for Null values in query criteria. Also using Nz function would be much simpler than using IIf with IsNull. Instead of:
Like IIf(IsNull([Forms]![frmReportPrinting]![txtTaskOrderNumber]),”*”,[Forms]![frmReportPrinting]![txtTaskOrderNumber])
I’d use:
Like Nz(([Forms]![frmReportPrinting]![txtTaskOrderNumber]),”*”)
Explicitly specifying form reference as query parameter is probably best approach, another option would be to wrap expression in Eval function. Example:
Like Eval(“Nz([Forms]![frmReportPrinting]![txtTaskOrderNumber],’*’)”)
If you use this expression, when you open 2nd (crosstab) query based on 1st query you will not get the “Jet database engine does not recognize….” msg even though form reference not explicitly specified as a parameter in 1st query. Note use of double quotes around expression to be evaluated by Eval, & single quotes around asterisk. However, if referenced form is not open when either query opened, the Eval function will result in a somewhat cryptic msgbox, as illustrated.
HTH
-
WSVernon-Knight
AskWoody Lounger
-
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
No Newsletters since 27 January (Awaiting moderation)
by
rog7
4 minutes ago -
No Newsletters since 27 January (Awaiting moderation)
by
rog7
5 minutes ago -
Windows Update “Areca Technology Corporation – System – 6.20.0.41”
by
Bruce
45 minutes ago -
Google One Storage Questions
by
LHiggins
1 hour, 56 minutes ago -
Button Missing for Automatic Apps Updates
by
pmcjr6142
10 minutes ago -
Ancient SSD thinks it’s new
by
WSila
5 hours, 55 minutes ago -
Washington State lab testing provider exposed health data of 1.6 million people
by
Nibbled To Death By Ducks
9 hours, 55 minutes ago -
WinRE KB5057589 fake out
by
Susan Bradley
3 hours, 14 minutes ago -
The April 2025 Windows RE update might show as unsuccessful in Windows Update
by
Susan Bradley
16 hours, 6 minutes ago -
Firefox 137
by
Charlie
43 minutes ago -
Whisky, a popular Wine frontend for Mac gamers, is no more
by
Alex5723
22 hours, 18 minutes ago -
Windows 11 Insider Preview build 26120.3863 (24H2) released to BETA
by
joep517
22 hours, 30 minutes ago -
Windows 11 Insider Preview build 26200.5551 released to DEV
by
joep517
22 hours, 32 minutes ago -
New Windows 11 PC setup — can I start over in the middle to set up a local id?
by
ctRanger
15 hours, 37 minutes ago -
Windows 11 Insider Preview Build 26100.3902 (24H2) released to Release Preview
by
joep517
1 day, 2 hours ago -
Oracle kinda-sorta tells customers it was pwned
by
Nibbled To Death By Ducks
1 day, 8 hours ago -
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
1 day, 18 hours ago -
Office apps read-only for family members
by
b
1 day, 21 hours ago -
Defunct domain for Microsoft account
by
CWBillow
1 day, 17 hours ago -
24H2??
by
CWBillow
27 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
1 day, 2 hours ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
6 hours, 47 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
17 hours, 20 minutes ago -
two pages side by side land scape
by
marc
3 days, 18 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
3 days, 20 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
2 days, 23 hours ago -
Security Essentials or Defender?
by
MalcolmP
3 days, 2 hours ago -
April 2025 updates out
by
Susan Bradley
1 minute ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
2 days, 19 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
2 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.