Navigate from the subform record to view the complete order

B

Barry McConomy

Hi

I have a form with a subform. the form has Customer Details and the sub form
will show all Customer Order Numbers and Order Dates.

What I would like to do is navigate from a particular record in the Customer
Order subform and view the complete order.

Can any body advise how I do this.

Regards
Barry
 
A

Arvin Meyer [MVP]

If you want a second subform, as in the Orders form in the Northwind sample
database, use that as an example. I generally just use a popup form with the
details. You just build the details form and in the OrderID textbbox, set
the default value to:

Forms!YourFirstFormName!txtOrderID

or whatever you've named the OrderID tectbox on the first form.

Then open the form withL

DoCmd.OpenForm "YourFormName", , , "OrderID = " & Me.txtOrderID

You can also use OpenArgs when you open the second form like:

DoCmd.OpenForm "YourFormName", , , , , , "OrderID"

Then in the second form use some code to read the argument:

If Me.NewRecord = True Then
Me.txtOrderID = Me.OpenArgs
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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