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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From Form to Report...how to report on one and only one record? 1

Status
Not open for further replies.

Ogart

Technical User
Mar 26, 2003
104
US
Greetings:
In the home stretch on my application...

I've got a lovely form where the user inputs everything. I've also got a lovely report written (basically).

What I'd like to do is set up a command button on my form which triggers the print preview of said report. And, I'd like the report to look ONLY at the record the user was looking at in the (data input) Form.

Much appreciate any thoughts on best way to do this.

Thanks again for a LOT of help from everyone past and present.

CP

-->Just because you can, doesn't mean you should.
 
In the query that populates your lovely report - in the criteria of the RecordID (that is being viewed) enter thereference to that field:
Like Forms!frmInput!RecordID & *
- on the form add a command button that opens the report:

cmdPrint_Click
DoCmd.OpenReport "MyLovelyReport"



Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Worked like a charm. The query really wanted to insert it's own brackets and whatnot, which cornfused me for 30 seconds.

Like [Forms]![F_Requirements_Gathering]![Application_ID] & "*"

I had a minor glitch in that the query inserted a space in
"* "

Once I fixed that, worked like a charm. Many thanks Frank. Much appreicated.

Chris

-->Just because you can, doesn't mean you should.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top