How to go to previous record in subform?

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

Hi everyone
I've got stuck trying to get the focus to move to a
previous record within a subform. Here's a bit of detail:
I've got the BeforeDelConfirm event set up on the subform
and where the user presses Cancel I'd like the focus to
move to the first record within the subform. The reason
for this is that the focus moves down a record and it
appears to the user that the record that they said they
did NOT want to delete has disappeared. I'd like to
prevent this 'illusion' by getting the focus to go up to
the first record.
I was trying to use the DoCmd.GotoRecord from within the
subform but I can't seem to get the syntax right.
The main form is frm_AmendEstimate
The subform is frm_AmendEstSubform
Can you help?
Thanks for any help you can give - it's much appreciated!
Lee
 
-----Original Message-----
Hi everyone
I've got stuck trying to get the focus to move to a
previous record within a subform. Here's a bit of detail:
I've got the BeforeDelConfirm event set up on the subform
and where the user presses Cancel I'd like the focus to
move to the first record within the subform. The reason
for this is that the focus moves down a record and it
appears to the user that the record that they said they
did NOT want to delete has disappeared. I'd like to
prevent this 'illusion' by getting the focus to go up to
the first record.
I was trying to use the DoCmd.GotoRecord from within the
subform but I can't seem to get the syntax right.
The main form is frm_AmendEstimate
The subform is frm_AmendEstSubform
Can you help?
Thanks for any help you can give - it's much appreciated!
Lee
.
Hi Lee,
assuming that the event is in the subform, try...

me.recordset.movefirst

luck
Jonathan
 
Back
Top