E
Erod1980
I'm trying to catch duplicates in an access form. I have a series of queries
that looks for in between dates for contracts. If the query catches a dup
record then it checks off a hidden dup field in the form. I want the form to
undo all changes if this dup record field is true. On click of a button, it
runs the queries, and checks the Dup field. It was working for me at first,
but then it stopped working. Here is the code:
Private Sub cmdSaveChanges_Click()
Call Mods1.UserName
If Me.Dirty = True Then
Me.Refresh
Me.LastModDate = Now()
Me.LastModUserID = user()
DoCmd.RunMacro "mcCCG.UndoDupModWri"
Me.Refresh
If Me.chkDupDates = True Then
DoCmd.RunCommand acCmdUndo
End If
End If
End Sub
Plesae let me know what I can do to achieve this.
Thanks!
Enrique
that looks for in between dates for contracts. If the query catches a dup
record then it checks off a hidden dup field in the form. I want the form to
undo all changes if this dup record field is true. On click of a button, it
runs the queries, and checks the Dup field. It was working for me at first,
but then it stopped working. Here is the code:
Private Sub cmdSaveChanges_Click()
Call Mods1.UserName
If Me.Dirty = True Then
Me.Refresh
Me.LastModDate = Now()
Me.LastModUserID = user()
DoCmd.RunMacro "mcCCG.UndoDupModWri"
Me.Refresh
If Me.chkDupDates = True Then
DoCmd.RunCommand acCmdUndo
End If
End If
End Sub
Plesae let me know what I can do to achieve this.
Thanks!
Enrique