Linking a ListBox with a subform

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

hi,

I have a ListBox that displays site addresses.

I would like to be able to select an item in the list box and display the
full record in the sub form next to it.

Anyone any ideas how to go about this?
 
if the listbox's RowSource includes a field that matches a field in the
subform object's RecordSource - if both listbox and subform are based on the
same table, you can use the primary key field - then you can set the subform
control's LinkMasterFields property to the name of the listbox (and include
a column reference if the value you're using is not the BoundColumn), and
set the LinkChildFields to the name of the corresponding field in the
subform object's RecordSource. then making a selection in the listbox will
automatically bring up that record in the subform.

hth
 
Hey that's great - worked a treat. Thank you :-)

tina said:
if the listbox's RowSource includes a field that matches a field in the
subform object's RecordSource - if both listbox and subform are based on the
same table, you can use the primary key field - then you can set the subform
control's LinkMasterFields property to the name of the listbox (and include
a column reference if the value you're using is not the BoundColumn), and
set the LinkChildFields to the name of the corresponding field in the
subform object's RecordSource. then making a selection in the listbox will
automatically bring up that record in the subform.

hth
 
Back
Top