R
redFred
OK...it doesn't really because it is in the table. But it does vanish from
my form, until requeried.
I have a subform on my main form; it has a subform which has a subform which
contains the form I am adding a record to. During an event on a main form
command button I create a record in the targeted subform. Everything appears
fine except the data displayed on the main form disappears. I have debugged
this to the code "DoCmd.GoToRecord , , acNewRec". That's what makes the data
vanish from display.
Inserting a main form requery would probably work, but takes a lot of time
to accomplish.
I think it is a focus issue, but cannot get it right. If I am on [formMain]
and want to add a record to
[formMain].[formSubform1].[formSubform2].[formSubform3] What is the correct
code for the command button on the main form? BTW, subform2 and subform3 are
on a tab control of subform1. I don't think that matters, however.
The code that fails is:
Forms![formMain]!Reservationfrm.Form.tabJob.SetFocus
Forms![frm1 Client]!Reservationfrm!Jobfrm!Invoicefrm.SetFocus
DoCmd.GoToRecord , , acNewRec
I thought I had this and understood, but I ask help again.
Thanks.
my form, until requeried.
I have a subform on my main form; it has a subform which has a subform which
contains the form I am adding a record to. During an event on a main form
command button I create a record in the targeted subform. Everything appears
fine except the data displayed on the main form disappears. I have debugged
this to the code "DoCmd.GoToRecord , , acNewRec". That's what makes the data
vanish from display.
Inserting a main form requery would probably work, but takes a lot of time
to accomplish.
I think it is a focus issue, but cannot get it right. If I am on [formMain]
and want to add a record to
[formMain].[formSubform1].[formSubform2].[formSubform3] What is the correct
code for the command button on the main form? BTW, subform2 and subform3 are
on a tab control of subform1. I don't think that matters, however.
The code that fails is:
Forms![formMain]!Reservationfrm.Form.tabJob.SetFocus
Forms![frm1 Client]!Reservationfrm!Jobfrm!Invoicefrm.SetFocus
DoCmd.GoToRecord , , acNewRec
I thought I had this and understood, but I ask help again.
Thanks.