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

Subreport Linking Help

Status
Not open for further replies.

Djbell

IS-IT--Management
Apr 22, 2002
175
GB
Hi All

I have a form called Form1, on this form I have two supreports, subreport1 and subreport2. Subreport1 is based on a dataview that lists FirstName, Lastname and DOB. Subreport2 is based on a form using a tab control, this basically contains lots of information about that person. What I want is when someones name is clicked in Subreport1 I want the information in Subreport2 to reflect this. Can anyone give me a hand.

Regards

Douglas Bell
 
Don't you mean subforms and not subreports?

Try add an invisible text box "txtPersonID" on the main form. Add code to the On Current event of the first subform to set the value of txtPersonID to the primary key value from your person table:
Me.Parent.txtPersonID = Me.PersonPrimaryKey
Then set the link master/child property of subform2 to txtPersonID and the primary key of the person table.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi,

What are the names of your form and 2 subforms please?

Are you trying to use an code at the moment? If you are, please paste what you've got in between
Code:
 here
tags.
 
Hi Dhookom, yeah sorry I did mean SubForm, thanks for the reply will try that.

Hi thOrOn, I am using no code at the moment. The names are as follows:-

Form : Main Form
Subform1 : Students Subform
Subform2 : DetailsForm

Thanks for the replys

Regards

Douglas Bell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top