Selecting Subform Records from Unbound Listbox

  • Thread starter Thread starter DS
  • Start date Start date
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
 
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
 
DS,

Have you set the Link Master Fields property of the subform to the name
of the listbox?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Cannot select items in listbox 1
Filter records in a subform based on list box selection 5
ListBox Value 6
SQL Problem 1
No Records Then 4
Listboxes on continuous forms 1
linking subform to Listbox 4
Better Explanation 1

Back
Top