S
salmonella
I have a question I hope someone can help me with (a different, and i hope
better, approach to a problem I have been seeking advice on).
I have a parameter query that gets its value from a combo box (combo69). The
following function is in the criteria grid for one of the fields:
Like NZ([forms]![reports_switch_main]![combo69],"*")
When combo69 is null, I would like all records for the field to be returned
but because an “*†is used in the criteria, records with null values will not
be returned. I can’t use <is null or Like
NZ([forms]![reports_switch_main]![combo69],"*")> because it will also return
null values when a value is chosen from combo69.
The answer seems to be to replace the “*†with something like<is null or is
not null> this way if a value is chosen in combo69, that value is used in the
query and if not, all records will be returned for that field (whether null
or strings); (basically nullifies the criteria for that field). However, can
this be done??? Does anyone know how to set the criteria on the query so that
it uses the value in combo69 or, if no value is chosen (null) returns a
string like <is null or is not null> which will not set any criteria for the
field?
This is really killing me!....any ideas??
Many thanks
better, approach to a problem I have been seeking advice on).
I have a parameter query that gets its value from a combo box (combo69). The
following function is in the criteria grid for one of the fields:
Like NZ([forms]![reports_switch_main]![combo69],"*")
When combo69 is null, I would like all records for the field to be returned
but because an “*†is used in the criteria, records with null values will not
be returned. I can’t use <is null or Like
NZ([forms]![reports_switch_main]![combo69],"*")> because it will also return
null values when a value is chosen from combo69.
The answer seems to be to replace the “*†with something like<is null or is
not null> this way if a value is chosen in combo69, that value is used in the
query and if not, all records will be returned for that field (whether null
or strings); (basically nullifies the criteria for that field). However, can
this be done??? Does anyone know how to set the criteria on the query so that
it uses the value in combo69 or, if no value is chosen (null) returns a
string like <is null or is not null> which will not set any criteria for the
field?
This is really killing me!....any ideas??
Many thanks