Article ID: 209261 - Last Review: July 15, 2004 - Revision: 1.1 ACC2000: Showing All Records (Including Null) in a Parameter QueryThis article was previously published under Q209261 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb). SUMMARY
When you run a query that takes its parameters from a form, no
records are returned by the query if you leave the field blank. If you
type an asterisk (*) in the field, only records with non-null values
are returned. This article describes a method that you can use to return all records, including those with null values, when you leave the parameter blank. NOTE: You can see a demonstration of the technique that is used in this article in the sample file Qrysmp00.exe. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base: 207626
(http://support.microsoft.com/kb/207626/EN-US/
)
ACC2000: Access 2000 Sample Queries Available in Download Center
MORE INFORMATION
The following example is based on the sample database Northwind.mdb.
Where Region Like Forms![Pick Employees]!Region & "*" Or Forms![Pick Employees]!Region Is Null REFERENCESFor more information about this topic, click Microsoft Access Help on the Help menu, type like operator in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
| Article Translations
|
Back to the top
