refresh/requery subform

  • Thread starter Thread starter Pendragon
  • Start date Start date
P

Pendragon

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!
 
See whether it works any better using this:

Forms!frmparticipant.subfrmPRT_Position.Form.Requery
 
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?
 
Back
Top