D
deeds
I have incorporated the code below that Tina suggested...
I followed the instructions below to
add 3 combo boxes to a header of a form with the details below. Now, when I
add one combo box...it works great...as soon as I add another combo box
nothing works...no data is returned. Why when i add more than 1 combo box
does it not bring back results? Can anyone help me figure out why this is
not working for me? What am I missing? Thanks much!
in the Header section of the form, add the unbound combo boxes. i'll call
them cboVendor, cboCategory, and cboDepartment. in the form's Properties
box, click on the RecordSource property and then the ellipsis (...) button
at the right side, which will take you into the Query Builder. add the
Contacts table to the top section, and pull the fields you want to see into
the grid below. in the field that holds the vendor data, add the following
criteria, as
Forms!FormName!cboVendor Or Forms!FormName!cboVendor Is Null
in the field that holds the category data, add the following criteria, as
Forms!FormName!cboCategory Or Forms!FormName!cboCategory Is Null
do the same for the field that holds the department data.
back in the form Design view, add a command button to the Header section.
add code to the button's Click event procedure, as
Me.Requery
now when you open the form in Form view, all the Contacts records should
display. choose a selection in any combination of the combo boxes, from one
to all three, and click the command button to requery the form's
RecordSource. you may want to add another command button to "Display all
records" again. add code to the button's Click event procedure, as
Me!cboVendor = Null
Me!cboCategory = Null
Me!cboDepartment = Null
Me.Requery
I followed the instructions below to
add 3 combo boxes to a header of a form with the details below. Now, when I
add one combo box...it works great...as soon as I add another combo box
nothing works...no data is returned. Why when i add more than 1 combo box
does it not bring back results? Can anyone help me figure out why this is
not working for me? What am I missing? Thanks much!
in the Header section of the form, add the unbound combo boxes. i'll call
them cboVendor, cboCategory, and cboDepartment. in the form's Properties
box, click on the RecordSource property and then the ellipsis (...) button
at the right side, which will take you into the Query Builder. add the
Contacts table to the top section, and pull the fields you want to see into
the grid below. in the field that holds the vendor data, add the following
criteria, as
Forms!FormName!cboVendor Or Forms!FormName!cboVendor Is Null
in the field that holds the category data, add the following criteria, as
Forms!FormName!cboCategory Or Forms!FormName!cboCategory Is Null
do the same for the field that holds the department data.
back in the form Design view, add a command button to the Header section.
add code to the button's Click event procedure, as
Me.Requery
now when you open the form in Form view, all the Contacts records should
display. choose a selection in any combination of the combo boxes, from one
to all three, and click the command button to requery the form's
RecordSource. you may want to add another command button to "Display all
records" again. add code to the button's Click event procedure, as
Me!cboVendor = Null
Me!cboCategory = Null
Me!cboDepartment = Null
Me.Requery