Kl,
As regards the GoToRecord, New action, you must have something else in
the macro,... another action referring to the form you are using as
the subform, or else you are entering the something in the Object Type
and Object Names arguments of the GoToRecord action, which is not
correct.
And no, the form is not open. Only your main form is open. The main
form has a control on it, a subform control, where the form you are
using as the source object of the subform is being displayed... but
the form you are displaying as a subform on the main form is not open,
only the main form is. This is consistent with other aspects of form
behaviour. For example, a bound textbox displays data from a field in
a table, but the data is not on the form, the data is in the table and
the control on the form only acts as an avenue through which the data
is displayed.
By the way, I have since realised that I gave some incorrect
information to you before. Sorry. A subform does not have a GotFocus
event, so you were right in the first place to use the OnEnter event.
I think all you need is a macro with 2 actions:
GoToRecord, New
GoToControl, [NameOfFirstField]
and put this macro on the subform's OnEnter event property. I have
just tested this and it works for me... when you tab into the subform.
Obviously if you enter the subform by clicking the mouse, the position
of the mouse pointer will determine the focus.
- Steve Schapel, Microsoft Access MVP