From: Pendragon on
I have looked at so many examples on this and I still can't get this right!

main form is frmParticipant
subform name is frmPRT_PositionCurrent
subform control name is subfrmPRT_Position

On the subform I have an AddNew command button, which adds a new record and
autopopulates specific fields. If I leave the tab control page and then come
back to it, the new record appears with the populated fields. However, after
clicking on the AddNew button, the record appears as a new record with no
fields (and the autonumber field displays "autonumber").

Here is what I am trying to use to refresh/requery. The focus is on the
subform with the command button.

Forms!frmparticipant.subfrmPRT_Position.Requery

I have also tried .Refresh and .Repaint as well as simply Me.Requery.

Help is so truly appreciated!
From: Douglas J. Steele on
See whether it works any better using this:

Forms!frmparticipant.subfrmPRT_Position.Form.Requery


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Pendragon" <Pendragon(a)discussions.microsoft.com> wrote in message
news:426B0762-7244-4781-8641-2B571B8FCA05(a)microsoft.com...
>I have looked at so many examples on this and I still can't get this right!
>
> main form is frmParticipant
> subform name is frmPRT_PositionCurrent
> subform control name is subfrmPRT_Position
>
> On the subform I have an AddNew command button, which adds a new record
> and
> autopopulates specific fields. If I leave the tab control page and then
> come
> back to it, the new record appears with the populated fields. However,
> after
> clicking on the AddNew button, the record appears as a new record with no
> fields (and the autonumber field displays "autonumber").
>
> Here is what I am trying to use to refresh/requery. The focus is on the
> subform with the command button.
>
> Forms!frmparticipant.subfrmPRT_Position.Requery
>
> I have also tried .Refresh and .Repaint as well as simply Me.Requery.
>
> Help is so truly appreciated!


From: Pendragon on
Thanks Doug, but that didn't resolve it either.

I tried to use a Requery on the parent form, but obviously, that reset the
parent form to the first record in the underlying table. It also moves the
focus back to the first tab page.

Any other thoughts?

"Douglas J. Steele" wrote:

> See whether it works any better using this:
>
> Forms!frmparticipant.subfrmPRT_Position.Form.Requery
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
> "Pendragon" <Pendragon(a)discussions.microsoft.com> wrote in message
> news:426B0762-7244-4781-8641-2B571B8FCA05(a)microsoft.com...
> >I have looked at so many examples on this and I still can't get this right!
> >
> > main form is frmParticipant
> > subform name is frmPRT_PositionCurrent
> > subform control name is subfrmPRT_Position
> >
> > On the subform I have an AddNew command button, which adds a new record
> > and
> > autopopulates specific fields. If I leave the tab control page and then
> > come
> > back to it, the new record appears with the populated fields. However,
> > after
> > clicking on the AddNew button, the record appears as a new record with no
> > fields (and the autonumber field displays "autonumber").
> >
> > Here is what I am trying to use to refresh/requery. The focus is on the
> > subform with the command button.
> >
> > Forms!frmparticipant.subfrmPRT_Position.Requery
> >
> > I have also tried .Refresh and .Repaint as well as simply Me.Requery.
> >
> > Help is so truly appreciated!
>
>
> .
>