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

Report Based on Form

Status
Not open for further replies.

rickyzicky

Programmer
Dec 20, 2001
35
US
I have a form with a subform.
The main form is simply name, address...called [dataentryF]

The subform is the amount the person in the main for donated with date of donation. [f:donationsSeq]

They are linked on a field called "seq".

I would like to have a report display (on exit) maintaining the current record number so I can print a thank you letter.

The problem I run into, is that it pulls up all records for the specific person if they donated more than once.
I would like to output based on the primary key (id) in donations subform, but I am having no luck getting the query to find the field in the subform.

Any suggestions?

 
You would need the record on the subform to be the active record in the subform. THen use code like:

Dim strWhere as String
strWhere = "[ID]=" & Me.sfrmControl.Form.txtID
DoCmd.OpenReport "rptThanks",acviewpreview, , strWhere

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