D
Dave
Access 2003:
Trying to create a demographics report that will allow the following.
Gender example
On the form "frmStudentDemographics" is a drop down field named "cboGender"
When the user makes a selection "Male" a report is generated for only Males.
But in some cases the user will want to run a report for both (all) genders.
So I added a check box next to the drop down named "ckAllGender"
My idea is that if that box is checked then the report will show information
on Both (all) genders.
So in the query that generates the report, in the criteria for the Gender
field I tried this:
IIf([forms]![frmStudentDemographics]![ckAllGender]=True,"",
[forms]![frmStudentDemographics]![cboGender])
Note - I also tried: = 1, = yes
My logic was that if there was nothing in the criteria ("") it would return
all genders.
Didn't work.
Any suggestions on how to rewrite my criteria
OR
A different approach to this problem
I am just using gender as an example as there will be several Demographic
fields with drop downs and I want the user to be able to report on ONE or
ALL for any of the fields.
Hope I am making sense.
Thanks
Dave
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5029 (20100414) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
Trying to create a demographics report that will allow the following.
Gender example
On the form "frmStudentDemographics" is a drop down field named "cboGender"
When the user makes a selection "Male" a report is generated for only Males.
But in some cases the user will want to run a report for both (all) genders.
So I added a check box next to the drop down named "ckAllGender"
My idea is that if that box is checked then the report will show information
on Both (all) genders.
So in the query that generates the report, in the criteria for the Gender
field I tried this:
IIf([forms]![frmStudentDemographics]![ckAllGender]=True,"",
[forms]![frmStudentDemographics]![cboGender])
Note - I also tried: = 1, = yes
My logic was that if there was nothing in the criteria ("") it would return
all genders.
Didn't work.
Any suggestions on how to rewrite my criteria
OR
A different approach to this problem
I am just using gender as an example as there will be several Demographic
fields with drop downs and I want the user to be able to report on ONE or
ALL for any of the fields.
Hope I am making sense.
Thanks
Dave
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5029 (20100414) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com