G
Guest
Hi ,
I have a pop up form which allows users to add a new record. When the popup
is closed, I have a Requery run at OnClose so that the Main Form
("frmcypNew") is updated with the new record. This works fine.
What I want to do is: have it so that the main form (which shares a
recordsource with the popup) will goto the Last Record (ie the new one) when
the popup closes.
I have tried:
DoCmd.GoToRecord acDataForm, "frmcypNew", acLast
in the OnClose, Deactivate and Unload events on the popup form - nothing
happens.
I have tried:
DoCmd.GoToRecord acLast
in the GotFocus event of the mainform - to no avail - and the same in the
Current event of the main form - This does work, but causes problems when
trying to view any records other that the newly entered (ie makes it
impossible).
What code do I need and where?
Thanks in advance
Jim
I have a pop up form which allows users to add a new record. When the popup
is closed, I have a Requery run at OnClose so that the Main Form
("frmcypNew") is updated with the new record. This works fine.
What I want to do is: have it so that the main form (which shares a
recordsource with the popup) will goto the Last Record (ie the new one) when
the popup closes.
I have tried:
DoCmd.GoToRecord acDataForm, "frmcypNew", acLast
in the OnClose, Deactivate and Unload events on the popup form - nothing
happens.
I have tried:
DoCmd.GoToRecord acLast
in the GotFocus event of the mainform - to no avail - and the same in the
Current event of the main form - This does work, but causes problems when
trying to view any records other that the newly entered (ie makes it
impossible).
What code do I need and where?
Thanks in advance
Jim