Redirecting after click on a query subform

  • Thread starter Thread starter Arjan
  • Start date Start date
A

Arjan

Hi All,

Situation:
I have a tabcontrol with the on the tabpage1 a querie-subform "project
overview" where a summary is stated with general information with also the
field "project name" in the subform. on tabpage2 there is a table-subform
"project documentation" with more detailed information.

What I would like to do is: when I click on a record on the querie-subform,
the user should be redirected to tabpage2 where the information is stated ith
the information of the clicked record.

How can I do this?

For your information; all information is stored in the same table as there
are only approx. 25 fields.

Thanks and best regards,

Arjan Bregman
 
Arjan said:
I have a tabcontrol with the on the tabpage1 a querie-subform "project
overview" where a summary is stated with general information with also the
field "project name" in the subform. on tabpage2 there is a table-subform
"project documentation" with more detailed information.

What I would like to do is: when I click on a record on the querie-subform,
the user should be redirected to tabpage2 where the information is stated ith
the information of the clicked record.


Add a hidden text box (named txtLink) to the main form. Set
the second subform control's LinkMasterFields property to
txtLink and the LinjChilrdFields property to the primary key
field.

Then, in your first subform's click event procedure, set
txtLink to the primary key field of the record in the first
subform. Then set the tab control's value to the desired
page number.

Parent.txtLink = Me.PKfield
Parent.tabcontrol = 1
 
Back
Top