T
TOMH
Have seen several posts similar to this, but am still having problems,
possibly because I have so many search fields....
I have created a form with seven blank fields, most of them combo boxes, one
of them a text box. There is a subform set to datasheet view that has a query
as its source.
Each blank field in the main form corresponds to one of the fields of the
query (ex: Area, Unit, Work Order #, Description). I want users to be able to
enter search criteria into any one of the fields or any combination of the
fields to return results, displayed in the subform.
Fields left blank should result in all records for that field,but those
records must still conform to the other search terms NOT left blank.
Problems keep showing up because some of the records in the query contain
Null values in some fields. I need those records to still show up if one of
the other criteria matches that record but not show up if a specific search
term has been entered into the field containing the Null value. (ex: if one
record has a null description, but I search by Unit, I still want that record
to show up. But if I search by description AND unit, I don't want the records
with null descriptions to show up.)
Have tried multiple SQL and VB codes for this and can't get any of them to
work right.
Thanks in advance to anyone who can save my sanity.
possibly because I have so many search fields....
I have created a form with seven blank fields, most of them combo boxes, one
of them a text box. There is a subform set to datasheet view that has a query
as its source.
Each blank field in the main form corresponds to one of the fields of the
query (ex: Area, Unit, Work Order #, Description). I want users to be able to
enter search criteria into any one of the fields or any combination of the
fields to return results, displayed in the subform.
Fields left blank should result in all records for that field,but those
records must still conform to the other search terms NOT left blank.
Problems keep showing up because some of the records in the query contain
Null values in some fields. I need those records to still show up if one of
the other criteria matches that record but not show up if a specific search
term has been entered into the field containing the Null value. (ex: if one
record has a null description, but I search by Unit, I still want that record
to show up. But if I search by description AND unit, I don't want the records
with null descriptions to show up.)
Have tried multiple SQL and VB codes for this and can't get any of them to
work right.
Thanks in advance to anyone who can save my sanity.