Update subquery after selecting from list box

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

Guest

This is a beginners question.
I have two tables. One just has a unique list of customers, and the the
other has details of orders. 1 to many relationship. In a form I make a list
box to select which customer to look at from table 1. Under this on the same
form I have a Subform listing the other table.

How do I make the subform update to the correct customer when I select from
the list box? Or can anyone point me to an example of this please?
 
Ham,

Open the form in design view and select the subform object; display the
Properties window, and go to tab Data. Change the Link Child Fields / Link
Master Fields properties by invoking the link wizard (click on the button
that appears on the right of the property box when you put the cursor in it)
so the Master (main form) and Child (subform) are linked on the customer ID
field.
Note: The link wizzard will only work if both the form and the subform are
bound to the tables. If the main form is unbound, you will have to manually
type in the names of the listbox for the main form (master) and the matching
control in the subform (child).

HTH,
Nikos
 
Back
Top