I am trying to open a form based on 2 where clauses in a Human Resources database. I have a main form that has the employee name and type of benefit they are enrolled in. I want to then open a subform for the employee that then provides further detail on that particular benefit (i.e. I want to filter the form based on employee id and benefit type). When I only push one of the where clauses through the code it works fine, but when i try to combine them I get a Run-time error 13 Type Mismatch. Code is below. What am I missing?
DoCmd.OpenForm "frm_Benefits_D ependants", acNormal, , "[EmployeeID]=" & [EmployeeID] And "[BenefitType]=" & "'" & [CMB_BenefitType] & "'"
Thank you in advance for any help you can provide!!
DoCmd.OpenForm "frm_Benefits_D ependants", acNormal, , "[EmployeeID]=" & [EmployeeID] And "[BenefitType]=" & "'" & [CMB_BenefitType] & "'"
Thank you in advance for any help you can provide!!
Comment