M
Martin
I am working with a database that uses a form to allow the user to select
three criteria for a query which is used in a report. One of the criteria is
a field containing either a Y or N. The user has been able to select either
Y or N to generate the report with the selected records, but now they want to
be able to select both, to get all records.
As far as I can tell, the controls from the form are used as the criteria in
the query design view. The problem I am having is what to enter into the
form to allow the query to select all records for that Y/N field.
I have tried coding vbNull into the control, but that does not work. Simply
leaving the control blank does not work (I assume that is the same as null).
I have tried coding "Y or N" into the control since that is what the SQL
looks like, but that does not work.
Is there a way to do what is needed? The only option I see now is to
duplicate the query (and possibly the report) to eliminate the need for the
Y/N field critieria.
Thanks.
three criteria for a query which is used in a report. One of the criteria is
a field containing either a Y or N. The user has been able to select either
Y or N to generate the report with the selected records, but now they want to
be able to select both, to get all records.
As far as I can tell, the controls from the form are used as the criteria in
the query design view. The problem I am having is what to enter into the
form to allow the query to select all records for that Y/N field.
I have tried coding vbNull into the control, but that does not work. Simply
leaving the control blank does not work (I assume that is the same as null).
I have tried coding "Y or N" into the control since that is what the SQL
looks like, but that does not work.
Is there a way to do what is needed? The only option I see now is to
duplicate the query (and possibly the report) to eliminate the need for the
Y/N field critieria.
Thanks.