'Filtering multiple fields from a form to open a report

MS Access Database: I have a report that I want to open from a form with multiple filter fields. Each filter works fine when used individually. They do not work when I try combining them.

DoCmd.OpenReport "Lessons Learned", acViewReport, , "Customer = '" & CustName & "'"

DoCmd.OpenReport "Lessons Learned", acViewReport, , "Phase = '" & ProjectPhase & "'"

When I try combining them with AND, I get errors

DoCmd.OpenReport "Lessons Learned", acViewReport, , "Phase = '" &ProjectPhase&"'" And "[Customer] = " & CustName& "'"

I have been trying to resolve this for weeks. Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source