Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Queries: Use a parameter to return all records if Null

Author(s)
Dev Ashish

(Q) I'm using a control on a form as a parameter for my query. I've defined the criteria in the query as

[Forms]![myForm]![myControl]

How do I set this up so that if the field is left blank, all records are returned by the query?

(A) Change the criteria in the query to

[Forms]![myForm]![myControl] OR [Forms]![myForm]![myControl] Is Null


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer