two filters on a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Simple question: How do I change the filter in the properties tab to do an
"or" filter:

PM_Name="Smith" OR Owner_Name="Smith"

how do I write the code or an or statement?

Thanks!
 
You would normally leave the filter property blank in a saved report. Use the
where condition in the DoCmd.OpenReport method to set the property.

Dim strWhere as String
strWhere = "PM_Name='Smith' OR Owner_Name='Smith'"
DoCmd.OpenReport "rptYourReport", acPreview, , strWhere
 
Back
Top