Changing Records in a subform

G

Guest

Hi again

I have a main form that has a subform which is a list of items from an
assets table. When a user clicks on an asset within the list I want the
details to be shown for that record in another subform. What code do I need
to put in the onclick event of the asset control?

Thanks, Ian
 
M

Marshall Barton

Ian said:
I have a main form that has a subform which is a list of items from an
assets table. When a user clicks on an asset within the list I want the
details to be shown for that record in another subform. What code do I need
to put in the onclick event of the asset control?


Add a hidden text box (named txtLink) to the main form's
header section.

Add a line of code along the lines of the below to the
continuous subform's Current event:
Parent.txtLink = Me.[name of primary key field]

Then set the single view subform control's Link Master
Fields property to txtLink and the Link Child property to
[name of primary key field]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top