two filters on a report

P

paula k

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!
 
D

Duane Hookom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top