I am attempting to print an Access 2000 report from VB6. The report requires one parameter. I use the Access object's DoCmd.OpenReport method, passing the parameter in the wherecondition. I get the following error message:
Run-time error '3075':
Syntax error (missing operator) in query expression '(EmployeeName = Aimee S)'
Can anyone help with my syntax problem?
My code reads:
strWhere = "EmployeeName = " & cboEmployeeMaster(0).Text
.Visible = True
.DoCmd.OpenReport "GroupByEmployee Report", acViewPreview, , strWhere