Following on from an earlier post, I thought I would ask a bit of further advice as I need a quick answer to this problem.
The query in my database seems to be returning all of the fields rather than just selecting those which match the criteria selected from dropdowns in a form. I have included the format for accepting nulls (as suggested by Jon K posted 03-05-2006
Basic Criteria Format
The example basically sets the criteria for each field in a separate column in the query grid like this in query Design view:-
-------------------------------------
Field: [FieldName]=[Forms]![FormName]![ControlName] or [Forms]![FormName]![ControlName] Is Null
Show: uncheck
Criteria: True
-------------------------------------
The [Forms]![FormName]![ControlName] Is Null enables us to leave the text box/combo box on the form blank. The True in the criteria row tells Access to treat the expression in the field row as the criteria.
The problem is, it does not seem to work in my database.
I have attached a copy of the bits I need help with (qrymain1 and searchform2 are the query and Form to use).
Hope you can help as I need to sort this ASAP.
Thanks
K
The query in my database seems to be returning all of the fields rather than just selecting those which match the criteria selected from dropdowns in a form. I have included the format for accepting nulls (as suggested by Jon K posted 03-05-2006
Basic Criteria Format
The example basically sets the criteria for each field in a separate column in the query grid like this in query Design view:-
-------------------------------------
Field: [FieldName]=[Forms]![FormName]![ControlName] or [Forms]![FormName]![ControlName] Is Null
Show: uncheck
Criteria: True
-------------------------------------
The [Forms]![FormName]![ControlName] Is Null enables us to leave the text box/combo box on the form blank. The True in the criteria row tells Access to treat the expression in the field row as the criteria.
The problem is, it does not seem to work in my database.
I have attached a copy of the bits I need help with (qrymain1 and searchform2 are the query and Form to use).
Hope you can help as I need to sort this ASAP.
Thanks
K