2nd call for help!! unretrieved records from a form query

dwrpsych128

Registered User.
Local time
Today, 03:51
Joined
Sep 11, 2013
Messages
11
I have a form that has the following fields: Ticket Date From, Ticket Date To, Pawnshop, Property Category, Item Description, Make, and Serial Number.
The purpose of this form is to allow an unexperienced user of Access to query a database. Thus far, when I specify the query to include dates from/to, pawnshop, property category (eg, jewelry), and item description (ring) the records retrieved are the correct number. None of these fields contain null values. However, the “Make” field has some null values and the “Serial Number” field has an extensive number of null values.

My problem is that I have noticed because the Make field has some null values a few number of records aren’t retrieved after my query (even if I leave the Make field blank). This problem is much worse with the Serial Number field. For instance, I ran a basic query via my form specifying the dates and property category-jewelry and got back 229 records but when I verified this with a separate query I got 960 records, which is the correct number.

My criteria from my querry are as follows:

Between [Forms]![PawnProperty_PawnerQueryForm].[TicketDateFrom] And [Forms]![PawnProperty_PawnerQueryForm].[TicketDateTo]

[Forms]![PawnProperty_PawnerQueryForm].[PropertyCategory]

Like "*" & [Forms]![PawnProperty_PawnerQueryForm]![Pawnshop] & "*"

Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[PropertyDescription] & "*"

Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[Make] & "*"

Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[SerialNumber] & "*"

The bottom two I've had to remove because the correct number of records were not being retrieved. I suspect that the null values in the Make and Serial Number fields are the root of the problem.

Please HELP!!! Any ideas on how to make these queries all work together!!
 
Add a null condition onto each one:

Like "*" & [Forms]![PawnProperty_PawnerQueryForm].[Make] & "*" OR Is Null
 

Users who are viewing this thread

Back
Top Bottom