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
|
|||
|
|||
Refering to subforms on tabbed controls
Hi
I have a main from on one tabbed page and a "daughter" form on the other. If I select a record on the main form, can I then switch to the second tab page and add records so that they are linked to the record on the first tab? Thanks |
#2
|
|||
|
|||
Refering to subforms on tabbed controls
I'm not sure I understand you. You can't have a "main form on a tabbed
page". Any form embedded in another form, whether it is on a tab control page or not, is a SUBFORM. Do you mean that you have a tab control on your MAIN form, where one page contains data fields from your main form's Recordset and another page contains a linked subform? If so, then all you need to do is set focus to the subform (either using the mouse or with code) after adding the record to your main form, and go from there. If, on the other hand, you have TWO subforms, one listing the records on the "one" side of a one-to-many relationship, and the other listing the related "many" records, then you can add a hidden textbox named txtLink to your main form (not the first subform) with the following ControlSource: =[Subform1].Form![name of primary key field] Then, for your second subform, set LinkMasterFields to txtLink, and set LinkChildFields to the name of the foreign key field in your many-side table. -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand wrote in message ups.com... Hi I have a main from on one tabbed page and a "daughter" form on the other. If I select a record on the main form, can I then switch to the second tab page and add records so that they are linked to the record on the first tab? Thanks |
Thread Tools | |
Display Modes | |
|
|