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 two subforms
Hi there,
I am using Acess 03 and I don't know if this is possible. I have three tables linked sequentially through one-to-many relationships. I'd like to create a mainform with two subforms, 1 and 2. The mainform would display data from table1, subform1 would be the related records in table2 for the record in the mainform as a datasheet, and subform2 displaying the related records in table 3 for the selected record in subform1. I had no trouble creating the main form and subform1, the trouble is subform2. Does this make sense? is it possible? Thanks for your help |
#2
|
|||
|
|||
linking two subforms
1. Create subform2 as if it was a standalone single form.
2. Create subform1 as if it was a standalone single form. Drag and drop subform2 onto subform1 to make subform2 a subform of subform1. 3. Create your main form. Drag and drop subform1 onto your mainform to make subform1 a subform of your mainform. Steve "Gen" wrote in message ... Hi there, I am using Acess 03 and I don't know if this is possible. I have three tables linked sequentially through one-to-many relationships. I'd like to create a mainform with two subforms, 1 and 2. The mainform would display data from table1, subform1 would be the related records in table2 for the record in the mainform as a datasheet, and subform2 displaying the related records in table 3 for the selected record in subform1. I had no trouble creating the main form and subform1, the trouble is subform2. Does this make sense? is it possible? Thanks for your help |
#3
|
|||
|
|||
linking two subforms
There is an example in the Northwind sample database that came with your
version of Access. One way to accomplish what you want is to set a hidden textbox on the main form equal to the primary key on Subform 1. Then set the foreign key link on Subform 2 equal to that textbox. It should look like: LinkMaster: [Forms]![MainFormName]![HiddenTextboxName] LinkChild: [ForeignKeyName] As new records in Subform 2 are created, they will pick up the proper foreign key value. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Gen" wrote in message ... Hi there, I am using Acess 03 and I don't know if this is possible. I have three tables linked sequentially through one-to-many relationships. I'd like to create a mainform with two subforms, 1 and 2. The mainform would display data from table1, subform1 would be the related records in table2 for the record in the mainform as a datasheet, and subform2 displaying the related records in table 3 for the selected record in subform1. I had no trouble creating the main form and subform1, the trouble is subform2. Does this make sense? is it possible? Thanks for your help |
#4
|
|||
|
|||
linking two subforms
thanks that was really simple and worked perfectly.
"Arvin Meyer [MVP]" wrote: There is an example in the Northwind sample database that came with your version of Access. One way to accomplish what you want is to set a hidden textbox on the main form equal to the primary key on Subform 1. Then set the foreign key link on Subform 2 equal to that textbox. It should look like: LinkMaster: [Forms]![MainFormName]![HiddenTextboxName] LinkChild: [ForeignKeyName] As new records in Subform 2 are created, they will pick up the proper foreign key value. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Gen" wrote in message ... Hi there, I am using Acess 03 and I don't know if this is possible. I have three tables linked sequentially through one-to-many relationships. I'd like to create a mainform with two subforms, 1 and 2. The mainform would display data from table1, subform1 would be the related records in table2 for the record in the mainform as a datasheet, and subform2 displaying the related records in table 3 for the selected record in subform1. I had no trouble creating the main form and subform1, the trouble is subform2. Does this make sense? is it possible? Thanks for your help |
Thread Tools | |
Display Modes | |
|
|