SubForm to link to a specific record

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I have a form that includes a subform within it.
This is what i want to be able to do...

When a list of records show in the subform, I want to be
able to click on one of those records and have that link
to that specific record in the database.

Can any one help. I am pretty sure that this can be done.
Thanks,
Sean
 
Hi
Ensure that the Link Child Fields and Link Master Fields
are defined in the subform.
With this Access will show only those linked records in
the subform.
For example main form consists of customer information
and the subform consisting all POs from the same customer
by linking the customer.
 
Sean,
This may help. I was having a similar issue a while back and Arvin Meyer
responded with this bit of advise. Works well for me now.

Here was my issue
"I am working on an application that utilizes 2 subforms, each contained on
a separate sheet of the folder like "tab control" .
The first subform "Listing"opens on the folder tab with a form type
datasheet view of a recordset. The user can scroll down through the
records viewing the data . Once they come to the record that hey are looking
for I would like to have them click on the "Record Selector" of that record
so when they open the next subform "Detail" by clicking the next tab control
label they would be looking at that next level of records relative to record
referenced on the first subform.

The concept works well but that when the second subform opens it is always
highlighted from the first subform. I have gone thru the help file and
several books but can't seem to find a way to do this or have Access report
to me the "current record". Anyone have any idea, I would be most
appreciative.

Arvin Wrote:
"There are 2 ways to do this, one of which (I can't remeber which) is
illustrated in the Northwind sample database that came with Access. The more
complex the recordset, the more I like the choice that that I have now come
to use exclusively, and that is as follows.

Add a hidden textbox to the main form and set its ControlSource = to the
matching ID field from the first subform.:

= Forms!FirstSubFormName.Form![txtID that matches the ID in the 2nd subform]

Now use the name of that hidden textbox in the LinkMaster property of the
2nd subform.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
OK. You can select a Record in the Subform but then what
do you want Access to do? "Link to that Record" does not
translate to any action in the GUI.

Also, you should post detail how the data in the Subform
is related to the data (if exists) in the main Form.

Van T. Dinh
MVP (Access)
 
Maybe Sean means that he wants to open a form showing the record that was
clicked on the subform?

Doug
 
Back
Top