A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo affects several subforms



 
 
Thread Tools Display Modes
  #1  
Old October 1st, 2009, 12:32 PM posted to microsoft.public.access.forms
auujxa2 via AccessMonster.com
external usenet poster
 
Posts: 118
Default 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  
Old October 2nd, 2009, 04:20 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old October 2nd, 2009, 06:27 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.