Where am I

  • Thread starter Thread starter imbd4a
  • Start date Start date
I

imbd4a

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
at the beginning of the recordset and not at the specific record 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.

Thanks,
Brian
 
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
 
Thanks, Arvin
I will give that a try today.
Brian
Arvin Meyer said:
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

imbd4a said:
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
at the beginning of the recordset and not at the specific record 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.

Thanks,
Brian
 
Back
Top