Opengrave
06-28-2002, 01:04 PM
Not sure if this is possible without VBA / SQL coding but any help would be appreciated. I am working on a database that deals with people’s talents and personality types and am trying to generate a report that can be filtered by values on 5 combo boxes on a form. The report should list everyone in the table unless the report is filtered using the combo boxes. I only want to restrict the report if the combo boxes have had values selected. I can get the report to filter based on combo box values with no problem, the problem I am having is that if I leave any of the combo boxes blank I get 0 records returned. I have to fill in all 5 combo boxes and have to have a record that meets the criteria for the query to return any records.
Basically what I want to say is if [Forms]![frmPersonalityReports]![cboPersonalityType1] is populated then filter the records by the value entered in [Forms]![frmPersonalityReports]![cboPersonalityType1] else return all records.
FrmPersonalityReports has 5 combo boxes and a button:
cboPersonalityType1
cboPersonalityType2
cboTalent1
cboTalent2
cboTalent3
and a cmdPreviewReport that opens the report
The report basically has lastname, firstname, PersonalityType1, PersonalityType2, Talent1, Talent2, Talent3
Any suggestions on how to do this with just a normal query or am I going to have to write a bunch of cases in VBA?
Basically what I want to say is if [Forms]![frmPersonalityReports]![cboPersonalityType1] is populated then filter the records by the value entered in [Forms]![frmPersonalityReports]![cboPersonalityType1] else return all records.
FrmPersonalityReports has 5 combo boxes and a button:
cboPersonalityType1
cboPersonalityType2
cboTalent1
cboTalent2
cboTalent3
and a cmdPreviewReport that opens the report
The report basically has lastname, firstname, PersonalityType1, PersonalityType2, Talent1, Talent2, Talent3
Any suggestions on how to do this with just a normal query or am I going to have to write a bunch of cases in VBA?