Filtering on reports

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

I have most of my code working for emailing specific reports to multiple
users except for the trying to apply a filter to a report, saving it, then
sending it to the specific user. My code

DoCmd.OpenReport "InventoryReOrder", acViewDesign
Set rpt = Reports("InventoryReorder")

rpt.Filter = Nz(lst.Column(1, varItem))
rpt.FilterOn = True

DoCmd.Save acReport, "InventoryReport"
DoCmd.Close acReport, "InventoryReport"

I know the syntax I have for creating the filter is wrong but I wanted to
show what I am tring to get. Right now "Nz(lst.Column(1, varItem))" is an
email address. It puts the email address in the filter but obviously I need
to have something in the filter that says = Nz(lst.Column(1, varItem))
I am not real good with VBA so I maybe I am totally missing something.
 

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