Link for sub form on form to sub form in same form

B

billybanter67

Hi all,

I have a form called "orders by customer" by customer, on this form I
have a sub form called "orders by customer subform".

At the moment I have it that you double click an order in the "orders
by customer subform" and it opens up another form called "orders" to
the order you double clicked on.

The code I use is

Dim stDocName As String
Dim stLinkCriteria As String
strDocName = "orders"
strWhere = "[orderid]=" & Me![OrderID] & ""
DoCmd.OpenForm strDocName, , , strWhere

What I want to do is now put the "orders" form as another subform in
the main form "orders by customer" and when you double click on
"orders by customer subform" on a order it refreshes the other sub
form "orders" to show the details of that order.

Does that make sense?

Thanks
 
J

Jeanette Cunningham

billybanter67,
there is an example of how to do this in the Northwind sample database.
Look at the form called Customer Orders.

To open Northwind, in A2003, go to help, choose sample databases and
northwind.


Jeanette Cunningham -- Melbourne Victoria Australia
 

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