Hi.
I'm hoping you can help me; I'm rather new to
VB, and like what it can do for you. Makes a tool so much more powerful than without.
I'm running into an error; (learning process.) The error is:
Run-time error '2001': You canceled the previous operation
I'm not sure what that means; tried googling it, nothing came up. Here's my code:
__________________________________________________ _____________
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim varDUPPO As Variant
If Me.NewRecord Then
varDUPPO = DLookup("[Reseller Account Number]", "[dup PO check]", "[Reseller Account Number] = '" & Me![Reseller Account Number] & "' AND [Reseller PO#] = '" & Me![Reseller PO#] & "' AND [End User Name] = " & Me![End User Name] & " AND [Amount] = " & Me![Amount])
If Not IsNull(varDUPPO) Then
If MsgBox("This record already exists." & _
"Cancel this new entry and review the previous entry?", _
vbQuestion + vbYesNo, _
"Duplicate Entry Found") _
= vbYes _
Then
Cancel = True
Me.Undo
Me.Recordset.FindFirst "[Reseller PO#]='" & varDUPPO & "'"
End If
End If
End If
End Sub
__________________________________________________ ____
Can anyone help me please? Thank you.
bluezcruizer