Unanswered: Validation Rule to Confirm Duplicates?
I have a form with Invoice Numbers. Since we use many vendors, occassionally an invoice number may be duplicated, so I did not make it a primary key or a unique value field. If an invoice number get entered that is a duplicate, I need a window to pop up basically stating "are your sure?" I think this will probably an "If" statement in the "After Update" for my field. Can anyone point me in the right direction to learn how to do this?
If IsNull(.Value) Or (.Value = .OldValue) Then
strWhere = "InvoiceNumber = """ & .Value & """"
varResult = DLookup("LogID", "PurchasingLog", strWhere)
If Not IsNull(varResult) Then
MsgBox "This Invoice Number is already used in Log ID " & varResult