R
rocketD
I recently posted a question about option groups passing info to a
query for a Yes/No field, and received some great advice. However,
I've tried to apply that advice in a similar way to a Date field, to
no avail. In the query, I want the user to be able to display (1) only
records with dates present or (2) only records without dates present
or (3) all records.
I changed the query criterion that worked for the checkbox as follows,
and placed it under the Date field which I want to select by (this
statement yields no records):
IIF([forms].[fmQryByClinicSurveys].[emailOptions]=1,(([tblTracking].
[Received]) Is Not Null), IIF([forms].[fmQryByClinicSurveys].
[emailOptions]=2,(([tblTracking].[Received]) Is Null),Null)) OR
[forms].[fmQryByClinicSurveys].[emailOptions]=3
The [emailOptions] control is the name of the option group frame on
the form. When I use Is Null or Is Not Null alone under the date
field, I get displays (1) and (2). I just don't know how to translate
this into my SQL statement.
Thanks for your help, I thought I understood what I was doing.
Dara
query for a Yes/No field, and received some great advice. However,
I've tried to apply that advice in a similar way to a Date field, to
no avail. In the query, I want the user to be able to display (1) only
records with dates present or (2) only records without dates present
or (3) all records.
I changed the query criterion that worked for the checkbox as follows,
and placed it under the Date field which I want to select by (this
statement yields no records):
IIF([forms].[fmQryByClinicSurveys].[emailOptions]=1,(([tblTracking].
[Received]) Is Not Null), IIF([forms].[fmQryByClinicSurveys].
[emailOptions]=2,(([tblTracking].[Received]) Is Null),Null)) OR
[forms].[fmQryByClinicSurveys].[emailOptions]=3
The [emailOptions] control is the name of the option group frame on
the form. When I use Is Null or Is Not Null alone under the date
field, I get displays (1) and (2). I just don't know how to translate
this into my SQL statement.
Thanks for your help, I thought I understood what I was doing.
Dara