Rosemary,
To set the subform to go to a new record, first set the focus on the
subform
control then use the GoToRecord method. I don't know the macro syntax,
but
the VBA methods are below.
[SubformName].SetFocus
DoCmd.GoToRecord , , acNewRec
Do the same to go to a previous record. First set the focus on the subform
control.
God Bless,
Mark A. Sam
"Rosemary" <Rosemary@[EMAIL PROTECTED]
> wrote in message
news:038DA9C9-E66B-41FA-B0B3-34385E362CEB@[EMAIL PROTECTED]
>I have a main form with a subform. The main form contains only displayed
> data; i.e., no control gets the focus. What I want to do is to set the
> focus
> on the subform to the "new" record. I have tried setting the Current
event
> on
> the subform (macro: GOTORECORD,,NEW) and it doesn't work correctly. It
> does
> set the focus correctly when the subform is initially displayed.
However,
> when I try to change the focus to a previous record, the focus
> automatically
> is reset to the "new" record. I have tried other events but none of them
> seem
> to work. I even tried setting an event in the Main form, but I get an
> error
> message stating that the subform isn't opened(?). I also want this to
work
> whenever I access the next "main form" record.
>
> Your help is greatly appreciated. Thanks in advance.


|