refresh/requery subform

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!
 
D

Douglas J. Steele

See whether it works any better using this:

Forms!frmparticipant.subfrmPRT_Position.Form.Requery
 
P

Pendragon

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top