Just to add to the problem, I have used the previously mentioned code and it works perfectly, however I have a secondary sub-form showing part of the record.
The sub-form updates using the Form_Current event:
Unfortunately this causes error 2118 - you must save the current record before you run the requery action.
Any clues?
The sub-form updates using the Form_Current event:
Code:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo eWM
If Not Me.Dirty Then
If (Count < 0) And (Me.CurrentRecord > 1) Then
DoCmd.GoToRecord , , acPrevious
ElseIf (Count > 0) And (Me.CurrentRecord <= Me.Recordset.RecordCount) Then
DoCmd.GoToRecord , , acNext
End If
Else
MsgBox "The record has changed. Save the current record before moving to another record."
End If
eWM:
Err.Clear 'Stop overshoot when no new record capability
End Sub
Private Sub Form_Current()
Me.Parent.Controls![frmSub2].Requery
End Sub
Any clues?