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.
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.