R
RobGMiller
Access 2003:
Try to open a report to print with the following:
ReportFilter = "PoId = " & Me!PoID & ""
StDocName = "PurchaseOrder"
DoCmd.OpenReport StDocName, acViewPreview, ReportFilter, ,
acWindowNormal
Report.OnActivate:
MsgBox Me.Filter shows it to be empty.
I've tried filter on = yes and no
I've tried to set the filter from the calling form after the report is
open using the following.
What did work is to open the report in design mode, set the
recordsource, save it and then reopen in normal preview mode.
I'm not sure if there are any implications of opening a report that
way. Its always disconcerting to have to use workarounds for things
that should work easily.
I'd like to discover why this filter cannot be loaded if I can.
Try to open a report to print with the following:
ReportFilter = "PoId = " & Me!PoID & ""
StDocName = "PurchaseOrder"
DoCmd.OpenReport StDocName, acViewPreview, ReportFilter, ,
acWindowNormal
Report.OnActivate:
MsgBox Me.Filter shows it to be empty.
I've tried filter on = yes and no
I've tried to set the filter from the calling form after the report is
open using the following.
What did work is to open the report in design mode, set the
recordsource, save it and then reopen in normal preview mode.
I'm not sure if there are any implications of opening a report that
way. Its always disconcerting to have to use workarounds for things
that should work easily.
I'd like to discover why this filter cannot be loaded if I can.