stormin_norm
Registered User.
- Local time
- Today, 08:00
- Joined
- Apr 23, 2003
- Messages
- 213
How can I get a continuous subform to stay on the current record?
When my afterupdate code runs a Requery on a field on a main form, the cursor moves to the next field on the subform but jumps to the first record in the recordset. The requery is resetting the subforms recordset.
As an example...the subform shows recs 1..5, after you change the value of rec3 you are now pointing to rec1. I want to stay on rec3.
I have a subform with the following code:
Private Sub ENG_hours_AfterUpdate()
On Error....
DoCmd.RunCommand acCmdSaveRecord
Me.Parent.ENGtotal.Requery
End
When my afterupdate code runs a Requery on a field on a main form, the cursor moves to the next field on the subform but jumps to the first record in the recordset. The requery is resetting the subforms recordset.
As an example...the subform shows recs 1..5, after you change the value of rec3 you are now pointing to rec1. I want to stay on rec3.
I have a subform with the following code:
Private Sub ENG_hours_AfterUpdate()
On Error....
DoCmd.RunCommand acCmdSaveRecord
Me.Parent.ENGtotal.Requery
End