Set filter for report from form

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

Guest

I have an option group on a form to (1) Select a category
or (2) all categories for a report. I've set the filter
variable (strFilter) and use

DoCmd.OpenReport stDocName, acPreview, strFilter

to open the report. How do I set the report to accept this
filter?
 
Use the WhereCondition instead of the filter. Example:

strFilter = "ID = " & Me.txtID
DoCmd.OpenReport stDocName, acPreview, , strFilter
 
Back
Top