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

Subform linked to a subform in a tab control

Status
Not open for further replies.

dpalai

Technical User
Aug 15, 2012
1
MS ACCESS 2000 (New user)

Hi All,

Short question: Is it possible to link a subform to a subform when both of them are in the same tab control?

I try to build a database to store information about existing birds in a Ramsar area, aiming to donate it to a local non-govermental organisation.

There are 3 tables:
Table 1: "BirdsTbl", PK BirdID
Table 2: "ReportsTbl", PK ReportID, FK BirdID
Table 3: "MultimediaTbl", PK MediaID, FK ReportID
Tables are linked as indicated above.

In a form, I have a Tabcontrol with 4 pages.
Page1 and Page2 host the controls of "BirdsTbl" (The main table)
Page 3 hosts the controls of "ReportTbl" and is linked to the page 1 as a Subform (I have designed a form on the basis of ReportsTbl, droped it in page 3 and made the connections accordingly).

Now, I'd like on page 4 to place a new subform which is made on the basis of table "MultimediaTbl" and to link it to subform on page 3.
I have tried to use the same procedure as in page 3 subform, but without success. The master field ReportID was not present.

Is there a way to achieve this?

Thank you in advance

Dimitris
 

You can link it directly to the subform, but the referencing gets a little complicated so without knowing all the names of the objects I will not try to explain. Here is the simple way to do it and works for linking any subforms.

Build a hiddent textbox anywhere on your form(The tabs have no influence on references). Call it "txtBxLink". In your subform on tab 3, in its on current event place the following code
me.parent.txtbxlink = me.[PK ReportID]
In your other subform set the properties (cannot be done with the wizard)
Link Master Fields:[txtBxlink]
Link Child Fields: [FK ReportID]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top