Move the Exit Sub above NextRecErr:, not after, so that your code does not continue there every time:
On Error GoTo NextRecErr
If Me.Dirty Then
MsgBox "You have unsaved changes! I will now save the changes.", vbCritical & vbOKOnly
Me.Dirty = False
End If
DoCmd.GoToRecord , , acNext
Exit Sub
NextRecErr:
MsgBox "An error has occured or you are at the end of the records.", vbInformation
End Sub