Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing comments to a report

Status
Not open for further replies.

Dmcniell

IS-IT--Management
Nov 3, 2003
8
US
Hello and thanks for the help!

I am running a report from a form with the simple command:

DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria

There's no problem there. But here's one thing I haven't been able to figure out how to do: I want to pass a comment or a string from the form to the report that explains the parameters selected in the form (for example begin and end date range). Next, I want to show the range info on the report so the user can reference.

I really appreciate any info or comments.

Thanks,
Dan
 
As long as the form remains open while the report is displayed in Preview or is being formatted and printed, you can make reference to the controls directly from the form. (i.e. dates, textboxes, comments, etc. )

EXAMPLE:
ControlSource entry in a textbox on the report

Code:
=FORMS![[i]formname[/i]]![[i]controlname[/i]]

Post back with any questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
I don't know if this will help but if you want to expose the stLinkCriteria, you can add a text box bound to:
=[Filter]

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top