The Subform Puzzle

pablavo

Registered User.
Local time
Today, 15:51
Joined
Jun 28, 2007
Messages
189
Hi folks.

I have been advised that I could have a linking problem with the database I am working on and that things are not linked the way they should be.

So I'm going to attempt to explain how I've linked my forms and invite anyone to see if they think I've incorrectly linked anything.


Table relationships look like this: (table and form names are made up just to make the thread more easier to read)
tblMain-tblOne-tblTwo-tblThree-tblFour

That's the order of relationships and each of their keys will have the same name:
tblMain -MainID
tlbOne -OneID+MainID
tblTwo - TwoID+OneID etc (OneID being the foreign key)


Keep in mind that the pattern here is that the txtlinks represent the forms and the child form uses the txtlink for master link!

Here goes! I have the main form "frmMain" and the subform "sfrmOne".
with Master/child links with the primary keys "MainID"

All other forms within tab Controls reside on the frmMain.

the first sfrmTwo (within frmMain) is linked to sfrmOne with a txtlink that resides on frmMain(expression =sfrmOne.Form!OneID)
Child/Master links are OneID and txtlink for Master.

The sfrmThree (within frmMain) is linked to sfrmTwo (because it's linked at the table level) with a new txtlink (=sfrmtwo.Form!twoID)

This Pattern is repeated with sfrmFour
linked to sfrmThree with txtlink (sfrmThree.form!ThreeID)

Can anyone see any problems here? They seem to be working well enough! The advice I got about incorrect linking was from someone with a lot of expertise! but unfortunately is very busy.

hmm, maybe it was on the table level :eek:
 
Last edited:
tblOne, tblTwo? What data do they contain? More likely you'd have a table called tblNumber that could store Ones, Twos, Threes AND Fours. If you were keeping track of people you wouldn't have a tblBob, tblJill, tblEd. Same issue.
 
Lagbolt wrote
tblOne, tblTwo? What data do they contain? More likely you'd have a table called tblNumber that could store Ones, Twos, Threes AND Fours. If you were keeping track of people you wouldn't have a tblBob, tblJill, tblEd. Same issue.

Thanks for replying Lagbolt.
I was merely using these names as systematic hypothetical tables rather than to complicate things by using tblCommitteeDetails, tblProjectYear, tblProjectMain, tblPreDisbursal, tblDisbursal etc.

And as you may tell, I've not included what is in the tables because I believe that it is irrelevant and only either confuses the topic or strays from it.

Hope this clarifys why I've set out the thread this way!:p
 
Last edited:

Users who are viewing this thread

Back
Top Bottom