Open popup for to a new record

  • Thread starter Thread starter Jim Tinder
  • Start date Start date
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
 
Back
Top