Linking Data from Main Form to Subform

T

tmdrake

I have created a main form with 4 combo boxes. When data is typed or
selected in one of these combo boxes, how do I make it so the information
using the selected in the combo boxe show up in my subform.

Thanks
 
J

John W. Vinson

I have created a main form with 4 combo boxes. When data is typed or
selected in one of these combo boxes, how do I make it so the information
using the selected in the combo boxe show up in my subform.

Thanks

It's not one of the options that the wizard provides, but you can use the name
of a combo box as a Subform's Master Link Field. It's not clear to me how
these combos relate to the subform - do you want each combo to independently
link to a single field in the subform's recordsource, or a combination of the
four combos linked to a four-field composite foreign key, or what?

John W. Vinson [MVP]
 
T

tmdrake

Hi John,

I am wanting each combo box to independently link to the subform
recordsource of the subform.
 
J

John W. Vinson

Hi John,

I am wanting each combo box to independently link to the subform
recordsource of the subform.

That's a bit unusual... what are the rowsources of the combos? Is your
database properly normalized? It's a bit odd to have four different searches
for the same recordset!

That said... you'll need to use the combo's AfterUpdate event to change either
the Master Link Field of the subform, or to change the subform's Recordsource
query to reflect the chosen combo value.

John W. Vinson [MVP]
 
Top