Mike,
Can you explain what roll the txtData box has? Could you explain the code briefly?
Option Compare Database
Option Explicit
Private Sub chkLock_AfterUpdate()
If Me.chkLock = True Then
Me.txtData = Me.txtSurname
Else
Me.txtData = vbNullString
End If
End Sub
Private Sub cmdAddRecord_Click()
DoCmd.GoToRecord , , acNewRec
If Me.chkLock = True Then
Me.txtSurname = Me.txtData
End If
End Sub
Private Sub cmdClose_Click()
DoCmd.Close acForm, Me.Name
End Sub
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub