Selecting Subform Records from Unbound Listbox

D

DS

I have an UnBound Form with an Unbound Listbox, I want to click on the
ListBox and have the corresponding record come up on the Subform (Continous)
The ChildLink on the Subform is SalesID
The MasterLink on the ListBox is SalesID in the first Column.
I just can't get this thing to work.
Thanks
DS
 
O

Ofer

Try and refresh the subform with any selection by putting,
me.SubFormName.requery on the after update event of the list box.
===========================================

The other option is to write the record source of the subform

Select * from MyTableName Where SalesID = Forms![MainFormName]![ListBoxName]

and put the above line to refresh the records with any selection
 
S

Steve Schapel

DS,

Have you set the Link Master Fields property of the subform to the name
of the listbox?
 
D

DS

Ofer said:
Try and refresh the subform with any selection by putting,
me.SubFormName.requery on the after update event of the list box.
===========================================

The other option is to write the record source of the subform

Select * from MyTableName Where SalesID = Forms![MainFormName]![ListBoxName]

and put the above line to refresh the records with any selection

:

I have an UnBound Form with an Unbound Listbox, I want to click on the
ListBox and have the corresponding record come up on the Subform (Continous)
The ChildLink on the Subform is SalesID
The MasterLink on the ListBox is SalesID in the first Column.
I just can't get this thing to work.
Thanks
DS
Still trying. Situation changed slightly. The unbound form is now a
Subform with an unbound listbox on it. When I click on the Listbox I
want the Subform to move to that record. I tried this..

Me.LineID=Me.List52.Column(6)

but all this does is change the lineID field to whatever it is in the
listbox. I need the subform to move to that record not change it.
Thanks
DS
 
Top