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

Let A Report Display A Forms Current Record

Status
Not open for further replies.

GussyBoy

IS-IT--Management
Mar 11, 2003
96
0
0
BS
I want to call a report from a form and have it display the current record on the form.

Please Help.

Thanks.
 
You can set a filter in the reports OnOpen event that selects only the record in your form.
 
In addition to Raymondo's suggestion, you can handle it from the query that provides the report's recordset.

Open the query in design view, select the key field (the one that will distinguish the record in both the form and report) and then set its critieria to:

Forms!YourFormName!ControlName

The control name will be for the control (text box, listbox, combobox) that is bound to the key field.

The report will now only show records related to the form's current record.

Cheers, Bill
 
In addition to Raymondo's suggestion, you can handle it from the query that provides the report's recordset.

Open the query in design view, select the key field (the one that will distinguish the record in both the form and report) and then set its critieria to:

Forms!YourFormName!ControlName

The control name will be for the control (text box, listbox, combobox) that is bound to the key field.

The report will now only show records related to the form's current record.

Cheers, Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top