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
|
|||
|
|||
Combo affects several subforms
I have a bound form, which selects the record I want by a combo box using:
Private Sub cboSite_AfterUpdate() Me.RecordsetClone.FindFirst "[Location:] = " & Me.cboSite Me.Bookmark = Me.RecordsetClone.Bookmark End Sub I have several subforms, all with the "[Location:]" field in it's respective table as my primary key. How can I have all the subforms link to the main combo? (me.cboSite)? Thank you SO MUCH in advance. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200910/1 |
#2
|
|||
|
|||
Combo affects several subforms
Hi auujxa2 ,
yes, you do this using the LinkMasterFields and LinkChildFields. Select a subform in design view, open the property dialog, on the data, set the 2 fields I mentioned above to the field Location. Location would be the primary key in the table for the main form and it would be a foreign key in the table for the subform. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "auujxa2 via AccessMonster.com" u37567@uwe wrote in message news:9cf0504373018@uwe... I have a bound form, which selects the record I want by a combo box using: Private Sub cboSite_AfterUpdate() Me.RecordsetClone.FindFirst "[Location:] = " & Me.cboSite Me.Bookmark = Me.RecordsetClone.Bookmark End Sub I have several subforms, all with the "[Location:]" field in it's respective table as my primary key. How can I have all the subforms link to the main combo? (me.cboSite)? Thank you SO MUCH in advance. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200910/1 |
#3
|
|||
|
|||
Combo affects several subforms
Type correction
Hi auujxa2 , yes, you do this using the LinkMasterFields and LinkChildFields. Select a subform in design view, open the property dialog, on the data *tab*, set the 2 fields I mentioned above to the field Location. Location would be the primary key in the table for the main form and it would be a foreign key in the table for the subform. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Jeanette Cunningham" wrote in message ... Hi auujxa2 , yes, you do this using the LinkMasterFields and LinkChildFields. Select a subform in design view, open the property dialog, on the data, set the 2 fields I mentioned above to the field Location. Location would be the primary key in the table for the main form and it would be a foreign key in the table for the subform. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "auujxa2 via AccessMonster.com" u37567@uwe wrote in message news:9cf0504373018@uwe... I have a bound form, which selects the record I want by a combo box using: Private Sub cboSite_AfterUpdate() Me.RecordsetClone.FindFirst "[Location:] = " & Me.cboSite Me.Bookmark = Me.RecordsetClone.Bookmark End Sub I have several subforms, all with the "[Location:]" field in it's respective table as my primary key. How can I have all the subforms link to the main combo? (me.cboSite)? Thank you SO MUCH in advance. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200910/1 |
Thread Tools | |
Display Modes | |
|
|