Results 1 to 2 of 2
  1. #1
    swaninwa is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    1

    Verifying duplicate invoice numbers?

    Greetings! I would like the invoice field of my database to warn me when there is a duplicate entry. I need it to allow duplicates -- as we often split bills between different accounts/departments, but is there a way for it to prompt me when there is a duplicate, so I might double check and make certain we aren't paying an invoice for the second time? Then, (in a perfect world) it would allow me to accept the duplicate or change it as needed. Any tips or advice is greatly appreciated. THANKS!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    The field is not a primary key and is set to allow duplicates?

    You could do a DLookup in the Before or After Update event of the textbox.

    If Not IsNull(DLookup("InvoiceID","tablename","InvoiceID= '" & Me.controlname & "'") Then
    MsgBox "There is an existing record for this invoice."
    End If

    If InvoiceID is a number field, remove the apostrophe delmiters.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-29-2011, 08:43 AM
  2. query for an invoice.
    By lakersfan34 in forum Access
    Replies: 7
    Last Post: 11-25-2011, 12:54 AM
  3. Verifying phone numbers
    By looloo in forum Forms
    Replies: 15
    Last Post: 09-23-2011, 07:38 AM
  4. Invoice
    By billyff in forum Access
    Replies: 3
    Last Post: 04-25-2009, 12:15 PM
  5. Invoice Number
    By rzwoo in forum Access
    Replies: 0
    Last Post: 02-25-2009, 01:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums