crosseydlobster
New member
- Local time
- Today, 09:48
- Joined
- Oct 15, 2009
- Messages
- 6
I have a query [QRY_register] that pulls from a few different tables and my goal is to include Null fields in the query. Therefore I have used an Nz statement in the criteria of my query to convert the Null values to zero… but I cannot get it to work.
The query is named QRY_register and it pulls from TBL_customer, TBL_Photo1Dates, TBL_Photo2Dates, TBL_Photo3Dates and TBL_PhotoshopDates
The query relates dates and times for photography classes. All dates are Long Date data types and all times are Medium Time data types.
If you open FRM_customers and search for any of the three customers; Jane Doe, John Doe and Baby Doe you will find the class dates they are registered for. When you press the confirm button for that customer’s record it runs a macro which opens RPT_confirm, sends the report as an email attachment and then closes the report. This only works for Baby Doe because as you will see this is the only record which is registered for each of the four photography classes. In other words none of the fields are null for this record. However, Jane and John Doe are not registered for each of these dates meaning that it produces a Null for those fields.
This is the error message I get: "An expression you entered is the wrong data type for one of the arguments".. The report is running from QRY_register and this is where I am attempting unsuccessfully to use the Nz statement in the query criteria to include those records with Null fields. I would love any insight! BTW this is still a work in progress. Thanks!
The query is named QRY_register and it pulls from TBL_customer, TBL_Photo1Dates, TBL_Photo2Dates, TBL_Photo3Dates and TBL_PhotoshopDates
The query relates dates and times for photography classes. All dates are Long Date data types and all times are Medium Time data types.
If you open FRM_customers and search for any of the three customers; Jane Doe, John Doe and Baby Doe you will find the class dates they are registered for. When you press the confirm button for that customer’s record it runs a macro which opens RPT_confirm, sends the report as an email attachment and then closes the report. This only works for Baby Doe because as you will see this is the only record which is registered for each of the four photography classes. In other words none of the fields are null for this record. However, Jane and John Doe are not registered for each of these dates meaning that it produces a Null for those fields.
This is the error message I get: "An expression you entered is the wrong data type for one of the arguments".. The report is running from QRY_register and this is where I am attempting unsuccessfully to use the Nz statement in the query criteria to include those records with Null fields. I would love any insight! BTW this is still a work in progress. Thanks!