Run time error 7768 on form

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

This code runs whenever a change occurs on a previous record. It usually
works fine. but sometime I get a runtime error 7768 when a change is made
to a combo box. It debugs to the following code. Whats the probelm?
Thanks...Randy

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim stDocName As String
DoCmd.SetWarnings False

If Not Me.NewRecord Then 'Save any edits first.
Me.Dirty = True
stDocName = "AppendCorrections"
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If
DoCmd.SetWarnings True
End Sub
 
Whoops, I forgot the error message. Here it is." In order to change data
through this form, the focus must be in a bound field that can be modified"
 
Back
Top