Link 2 forms on another form

G

Guest

I tried to re-create the Customer Orders form on the Northwind sample
database. This form is linked to the Customer table. The first subform on
this form is Customer Orders Subform1 and the second is Customer Orders
Subform2. When I click on an order on SubForm1, it does NOT move the
pointer on SubForm2.
Is there some property which needs to be set ?

Entries are as follows:

Customer Orders SubForm1
Link Child Fields.....CustomerID
Link Master Fields......CustomerID

Customer Orders SubForm2
Link Child Fields.....OrderID
Link Master Fields......[Customer Orders SubForm1].Form![OrderID]
 
J

Joan Wild

rmcompute said:
I tried to re-create the Customer Orders form on the Northwind sample
database. This form is linked to the Customer table. The first subform
on
this form is Customer Orders Subform1 and the second is Customer Orders
Subform2. When I click on an order on SubForm1, it does NOT move the
pointer on SubForm2.
Is there some property which needs to be set ?

Entries are as follows:

Customer Orders SubForm1
Link Child Fields.....CustomerID
Link Master Fields......CustomerID

Customer Orders SubForm2
Link Child Fields.....OrderID
Link Master Fields......[Customer Orders SubForm1].Form![OrderID]

In Northwind, there is code behind SubForm1 that requeries SubForm2.

A codeless method though, as an alternative:

On the Main Form (Customers) put a textbox (called txtLink). Set its
Control Source to
=[Customer Orders SubForm1].Form![OrderID]

Change the properties for Customer Orders SubForm2 to
Link Child Fields...OrderID
Link Master Fields...txtLink
 
G

Guest

I created it through form designer and it created the code behind the form.

Thanks for the help.

Joan Wild said:
rmcompute said:
I tried to re-create the Customer Orders form on the Northwind sample
database. This form is linked to the Customer table. The first subform
on
this form is Customer Orders Subform1 and the second is Customer Orders
Subform2. When I click on an order on SubForm1, it does NOT move the
pointer on SubForm2.
Is there some property which needs to be set ?

Entries are as follows:

Customer Orders SubForm1
Link Child Fields.....CustomerID
Link Master Fields......CustomerID

Customer Orders SubForm2
Link Child Fields.....OrderID
Link Master Fields......[Customer Orders SubForm1].Form![OrderID]

In Northwind, there is code behind SubForm1 that requeries SubForm2.

A codeless method though, as an alternative:

On the Main Form (Customers) put a textbox (called txtLink). Set its
Control Source to
=[Customer Orders SubForm1].Form![OrderID]

Change the properties for Customer Orders SubForm2 to
Link Child Fields...OrderID
Link Master Fields...txtLink
 

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

Top