Open popup for to a new record

J

Jim Tinder

I have a form with a command button on a subform header to
open a popup form (e.g. orders (rst=order_header)form with
command button to add line items to the order
(rst=order_detail)). I want the code for the button to
open a popup form and "goto" a new record in the popup
source table (order_detail).

I am using the DoCmd.OpenForm "mypopup" function to open
the popup form and then a call to another function to
perform some checks and gets some values from the order
form before going to a new record. The call function has
the following code:

With mypopup
![part_number].SetFocus
DoCmd.GoToRecord acDataForm, acNew
end with

The above produces an error: "The object '0' is not open"

Any help would be appreciated...
Thanks
Jim Tinder
 
?

???

Jim Tinder said:
I have a form with a command button on a subform header to
open a popup form (e.g. orders (rst=order_header)form with
command button to add line items to the order
(rst=order_detail)). I want the code for the button to
open a popup form and "goto" a new record in the popup
source table (order_detail).

I am using the DoCmd.OpenForm "mypopup" function to open
the popup form and then a call to another function to
perform some checks and gets some values from the order
form before going to a new record. The call function has
the following code:

With mypopup
![part_number].SetFocus
DoCmd.GoToRecord acDataForm, acNew
end with

The above produces an error: "The object '0' is not open"

Any help would be appreciated...
Thanks
Jim Tinder
 

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