I have a form with combo boxes that is based on a query, and the form outputs to a customized report based on what options the user selected from the combo boxes. For the 1st query I entered the following criteria so that the user can leave certain combo boxes blank if desired and the query won't return no results:
[Forms]![frmBuildCustomReport]![cboDepartmentName] Or Like [Forms]![frmBuildCustomReport]![cboDepartmentName] Is Null
Which is all fine and works great. The report is actually based on the 2nd query, which pulls the info from the 1st query and adds a couple of fields to it.
Here is my odd issue. When a user selects "CPD" as the Department from the Dept Combo box, and then any Serial # from the Serial # combo, the report returns all the desired records but adds 1 record from the CPD dept. that has no Serial #. So for example if user asks to view all items with the Serial # ABC123 in Department CPD, it will show all of those plus this mop bucket with no Serial #. Every time, no matter what Serial # is chosen.
Upon analyzing the database there are multiple other records in Department CPD with no Serial Number, but it doesn't pull any of those. Any idea why it would be adding this one record to every report in that Department regardless of what Serial # is specified?
[Forms]![frmBuildCustomReport]![cboDepartmentName] Or Like [Forms]![frmBuildCustomReport]![cboDepartmentName] Is Null
Which is all fine and works great. The report is actually based on the 2nd query, which pulls the info from the 1st query and adds a couple of fields to it.
Here is my odd issue. When a user selects "CPD" as the Department from the Dept Combo box, and then any Serial # from the Serial # combo, the report returns all the desired records but adds 1 record from the CPD dept. that has no Serial #. So for example if user asks to view all items with the Serial # ABC123 in Department CPD, it will show all of those plus this mop bucket with no Serial #. Every time, no matter what Serial # is chosen.
Upon analyzing the database there are multiple other records in Department CPD with no Serial Number, but it doesn't pull any of those. Any idea why it would be adding this one record to every report in that Department regardless of what Serial # is specified?