I donít have much of experience with error handling. Iím wondering if it possible to track in with of the controls the error occurs and set focus to that control referring to it by something like activecontrol or previouscontrol, without the control name itself.
Below is the code to save a record. It works OK. The problem is that when the error occurs I canít set focus to the control that courses the error. I use this procedure for many different forms, so Iím trying to avoid using particular formís control names.
Any help is greatly appreciated.

Private Sub cmdSave_Click()
On Error GoTo cmdSave_Err
blnNewEdit = True

If Me.Dirty Then
DoCmd.RunCommand Command:=acCmdSaveRecord
Call FlipEnabled(Me, Me.cmdFirst)
cmdPrevious.Enabled = False
DataEntryError Me
End If

Exit Sub

MsgBox Err.Description, vbExclamation, "Data Entry Error"
Resume Exit_cmdSave_Click