If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking Forms and Subforms
I have a database that inventories controlled documents. Each document has a
version, or possibly many versions. I would like to set up a form and subform so that the document number is in the main form, and the subform contains the version specific information. Each document number has it's own identifier. I cannot figure out how to link the two forms so that the multiple versions stay attached to the document number. |
#2
|
|||
|
|||
Linking Forms and Subforms
So you have one unique Document number, with one or many Versions
related to that Document? If so, you need one table (ie tblDocuments) to store the Document No. plus any general info about the document that is unaffected by the Version No. If the Document number will always be unique and never repeated, then you can use that as the Primary Key (ie DocumentID), otherwise you could use an autonumber PK. You need another table to store information about each Version (ie tblVersions) with it's own unique PK, plus a DocumentID field as a Foreign Key to tblDocuments. Then you main form would be based on tblDocuments and your subform based on tblVersions, linked by DocumentID -- _________ Sean Bailey "LeslieJ" wrote: I have a database that inventories controlled documents. Each document has a version, or possibly many versions. I would like to set up a form and subform so that the document number is in the main form, and the subform contains the version specific information. Each document number has it's own identifier. I cannot figure out how to link the two forms so that the multiple versions stay attached to the document number. |
#3
|
|||
|
|||
Linking Forms and Subforms
Thank you so much! I thought that was going to be it, but thank you so much
for confirming that it was! Have a great day ) Beetle wrote: So you have one unique Document number, with one or many Versions related to that Document? If so, you need one table (ie tblDocuments) to store the Document No. plus any general info about the document that is unaffected by the Version No. If the Document number will always be unique and never repeated, then you can use that as the Primary Key (ie DocumentID), otherwise you could use an autonumber PK. You need another table to store information about each Version (ie tblVersions) with it's own unique PK, plus a DocumentID field as a Foreign Key to tblDocuments. Then you main form would be based on tblDocuments and your subform based on tblVersions, linked by DocumentID I have a database that inventories controlled documents. Each document has a version, or possibly many versions. [quoted text clipped - 5 lines] I cannot figure out how to link the two forms so that the multiple versions stay attached to the document number. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200806/1 |
Thread Tools | |
Display Modes | |
|
|