link child fields - list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
In my main form I have a listbox listing fieldA (primary key) from
table1, and I have a subform displaying data queries from table2 (one of the
field is related to fieldA in table1. Can someone please tell me how can I
link the selected (clicked) listbox item and query the subform using link
child fields?


Thanks,
Jeff
 
Hi all,
In my main form I have a listbox listing fieldA (primary key) from
table1, and I have a subform displaying data queries from table2 (one of the
field is related to fieldA in table1. Can someone please tell me how can I
link the selected (clicked) listbox item and query the subform using link
child fields?

Set the Master Link Field to the name of the listbox (which must be a
single select, not multiselect, and have the FieldA as its bound
column); be sure to enclose the name in [square brackets].

Set the Child Link Field to the name of the corresponding foreign key
field in the subform's recordsource query.

John W. Vinson[MVP]
 
thanks guys, your posts help me alot :-)



John Vinson said:
Hi all,
In my main form I have a listbox listing fieldA (primary key) from
table1, and I have a subform displaying data queries from table2 (one of the
field is related to fieldA in table1. Can someone please tell me how can I
link the selected (clicked) listbox item and query the subform using link
child fields?

Set the Master Link Field to the name of the listbox (which must be a
single select, not multiselect, and have the FieldA as its bound
column); be sure to enclose the name in [square brackets].

Set the Child Link Field to the name of the corresponding foreign key
field in the subform's recordsource query.

John W. Vinson[MVP]
 
Thank you all so much. That really cleared up an issue I was spending a lot
of time on. Also didn't take the 50 paragraphs of code I thought it would.

WebDude said:
thanks guys, your posts help me alot :-)



John Vinson said:
Hi all,
In my main form I have a listbox listing fieldA (primary key) from
table1, and I have a subform displaying data queries from table2 (one of the
field is related to fieldA in table1. Can someone please tell me how can I
link the selected (clicked) listbox item and query the subform using link
child fields?

Set the Master Link Field to the name of the listbox (which must be a
single select, not multiselect, and have the FieldA as its bound
column); be sure to enclose the name in [square brackets].

Set the Child Link Field to the name of the corresponding foreign key
field in the subform's recordsource query.

John W. Vinson[MVP]
 
Back
Top