Link Report to Record in Form

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 09:25
Joined
Jul 15, 2008
Messages
2,271
Hi, I have a Form showing data for a Club Member with buttons that activate reports for the Club Member. One report is a statement via a macro. The first query is a Make Table query selecting Member ID. I would like to link the Forms Member ID to the Query Member ID. For the other Reports I have done this by adding "[LDPK]="&Me![LDPK] to the DoCmd in the on click event but this does not work for the macro report. Appreciate any ideas.:confused:
 
In your query set the criteria to the form field you want a report for.
If the form is called frmMemberSearch and the field is MemberID you would set the criteria to:

[Forms]![frmMemberSearch]![MemberID]
 
Thanks Statsman. Link works fine. Appreciate your assistance.
Regards, Bill
 
Hi Statsman, New problem on Link issue.. The form also has a subform with records of Loans. I have a number of buttons for the records that call up forms and reports for the given Loan but when I dded a button to activate a statement for a loan it does not recognise [Forms]![QFindClubMembLoanQuerysubform]![LDPK] and still asks for a manual entry. Is there some diff between a form and its buttons and a subform and its buttons??
Appreciate advise, Regards, Bill
 
It sounds as though your query is requesting a different parameter. Double check the query that's run from the command button to create the statement.
 
The subform is continous with often more then 1 LID (link field). Could this be the problem with linking to [formname]![fieldname]. The button is on the record itself. I am thinking of inserting a form at the beginning of the macro that selects the LID record and then the macro uses that form which only has one record. Will try in an hour or so. Regards,
Bill
 

Users who are viewing this thread

Back
Top Bottom