R
Randy
I need a query to run from my main form only when a change has been made to
a previous record, not a new record. The code below works fine when a
change has been made to a previous record but it also runs when a new record
is entered. How do I prevent the query from running when a new record is
entered...Thanks...Randy
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim stDocName As String
If Me.Dirty Then 'Save any edits first.
Me.Dirty = True
stDocName = "AppendCorrections"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Else
End If
End Sub
a previous record, not a new record. The code below works fine when a
change has been made to a previous record but it also runs when a new record
is entered. How do I prevent the query from running when a new record is
entered...Thanks...Randy
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim stDocName As String
If Me.Dirty Then 'Save any edits first.
Me.Dirty = True
stDocName = "AppendCorrections"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Else
End If
End Sub