MaggieLeatherman
Programmer
Hello!
These 2 commands work perfectly by themselves!
DoCmd.OpenReport stDocName, acPreview, , "[BuildingIDFK] = " & Me.txtBuildingID
DoCmd.OpenReport stDocName, acPreview, , "([Percentasbestos] like '*%*' or [Percentasbestos] = 'ACM')"
But I need the criteria together in on OpenReport command. Below I put both the criteria stmts together from above and just separated them with the word 'and'. Now getting
"Type Mismatch" error and the report won't open. Can you help?
DoCmd.OpenReport stDocName, acViewPreview, , "[BuildingIDFK] = " & Me.txtBuildingID And "([Percentasbestos] like '*%*' or [Percentasbestos] = 'ACM')"
Thanks as always for your assistance! Maggie
These 2 commands work perfectly by themselves!
DoCmd.OpenReport stDocName, acPreview, , "[BuildingIDFK] = " & Me.txtBuildingID
DoCmd.OpenReport stDocName, acPreview, , "([Percentasbestos] like '*%*' or [Percentasbestos] = 'ACM')"
But I need the criteria together in on OpenReport command. Below I put both the criteria stmts together from above and just separated them with the word 'and'. Now getting
"Type Mismatch" error and the report won't open. Can you help?
DoCmd.OpenReport stDocName, acViewPreview, , "[BuildingIDFK] = " & Me.txtBuildingID And "([Percentasbestos] like '*%*' or [Percentasbestos] = 'ACM')"
Thanks as always for your assistance! Maggie