C
Christopher Glaeser
How do I parameratize a report so that it can be opened from command buttons
on various forms? I think the code is something like:
DoCmd.OpenReport "rptMyReport", acPreview
Report!rptMyReport!<what_goes_here1> = Me.CallerName
Report!rptMyReport!<what_goes_here2> = Me.CallerCompany
Report!rptMyReport!<what_goes_here3> = Me.CallerPhone
I've done this type of thing for a form, but the form had a record source,
and each <what_goes_here> was a text box bound to a table entry. Can this
be done for a report without a record source? Or, is there a better
approach? I tried setting the Captions of unbound Text Labels, and that did
not seem to work.
Best,
Christopher
on various forms? I think the code is something like:
DoCmd.OpenReport "rptMyReport", acPreview
Report!rptMyReport!<what_goes_here1> = Me.CallerName
Report!rptMyReport!<what_goes_here2> = Me.CallerCompany
Report!rptMyReport!<what_goes_here3> = Me.CallerPhone
I've done this type of thing for a form, but the form had a record source,
and each <what_goes_here> was a text box bound to a table entry. Can this
be done for a report without a record source? Or, is there a better
approach? I tried setting the Captions of unbound Text Labels, and that did
not seem to work.
Best,
Christopher