I have a form with 28 checkboxes, all of which correspond to fields in a query. I have a button which I want to have pull up a report, but only show records with matching checks. For example, if a user clicks 2 checkboxes and hits the button, I want them to see all records that have those two checkboxes checked, including records that also have other checkboxes checked. Here's what I have in the code for the button so far:
DoCmd.OpenReport "ReportName", acPreview, , "ChkBox1 <= [Forms]![FormName]![Field1] and ChkBox2 <= [Forms]![FormName]![Field2] and etc.
This works fine for one form with a half-dozen checkboxes, but the problem with this one is, by the time I type that out for 28 checkboxes, I apparently run out of room on that line. Any suggestions?
Thanks
DoCmd.OpenReport "ReportName", acPreview, , "ChkBox1 <= [Forms]![FormName]![Field1] and ChkBox2 <= [Forms]![FormName]![Field2] and etc.
This works fine for one form with a half-dozen checkboxes, but the problem with this one is, by the time I type that out for 28 checkboxes, I apparently run out of room on that line. Any suggestions?
Thanks