So, I've got my multi-state query working, I've got my multi-checkbox query working, but when I add a 2nd checkbox to the statement below, it shows a query and/or report with ALL fields showing in a horrible layout/design and the relevent data for this report isn't even listed. I believe the problem is due to SELECT EMployeeDB.* -- the asterisk being a wildcard seems like it's telling the query to select ALL the fields. If I remove this part of the statement, I get prompts for the primary ID, firstname, lastname, etc. When nothing is entered into these prompts, they continue into an error " Microsoft Access can't find the field 'EmployeeDB.[Street Address 1]' referred to in your expression. You may have misspelled the field name, or the field may have been renamed or deleted.
Code:
SELECT EmployeeDB.[First Name], EmployeeDB.[Last Name], EmployeeDB.State, EmployeeDB.[Phone Number 1], EmployeeDB.[Phone Number 2], EmployeeDB.[Basic+], EmployeeDB.TWIC, EmployeeDB.HAZWOPER, EmployeeDB.Hydroblasting, EmployeeDB.[Scaffold Builder], EmployeeDB.[Confined Spaces], EmployeeDB.[OSHA 10], EmployeeDB.[OSHA 40], EmployeeDB.[CDL w/VAC], EmployeeDB.[CDL (standard)], EmployeeDB.[Valid Driver's License], EmployeeDB.[Job Types], EmployeeDB.[Site Specific Training 1], EmployeeDB.[Site Specific Training 2], EmployeeDB.[Site Specific Training 3], EmployeeDB.[Site Specific Training 4], EmployeeDB.[Site Specific Training 5], EmployeeDB.[Site Specific Training 6], EmployeeDB.[Eligible for Rehire], EmployeeDB.Status, EmployeeDB.*
FROM EmployeeDB
WHERE (((EmployeeDB.State) Is Null Or (EmployeeDB.State)=[Forms]![EmployeeListMenu]![ComboState1] Or ((EmployeeDB.State) Is Null Or (EmployeeDB.State)=[Forms]![EmployeeListMenu]![ComboState2]) Or ((EmployeeDB.State) Is Null Or (EmployeeDB.State)=[Forms]![EmployeeListMenu]![ComboState3]) Or ((EmployeeDB.State) Is Null Or (EmployeeDB.State)=[Forms]![EmployeeListMenu]![ComboState4])) AND ((EmployeeDB.[Basic+]) Like IIf([forms]![EmployeeListMenu]![CheckBasicPlus],True,"*")) AND ((EmployeeDB.HAZWOPER) Like IIf([forms]![EmployeeListMenu]![CheckHAZWOPER],True,"*")));