Code to open a Form using both idAcct and idOrder to identify the Form ??

M

MyEmailList

My situation:

1 - This form has a sub-Form

frmAcct (shows all Account fields)
...sub_frmOrders (a sub-Form of the above it list all Orders for the
Account)

2 - This form has a sub-form which has a sub-form

frmAcct_2 (Shows name of Account)
...sub_frmOrder (a sub-Form of the above it shows all order fields)
.....sub_frmOrderItems (a sub-form to the above sub-form shows order
items)


3 - When we double click an item in the sub-form on frmAcct we want to
open frmAcct_2 and show the details of the order and all order items.

(Note all our order items are unique so we do not have a table linking
Orders & Order Items as you would do for standard products database)

My question.

How do I modify this code... (or write the proper code)

stLinkCriteria = "[idAcct]=" & Me![idAcct]
DoCmd.OpenForm stDocName, , , stLinkCriteria

to open the proper frmAcct_2 and show the proper order?

Some how I need to tell Access that I want to open the form using both
idAcct and idOrder

I don't know how to do this in dot notation and would appriceate some
help with the coding.

Thanks for any help.

Mel
 

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