Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003

    Unanswered: Check for Duplicate

    I am at an impass.. I have a form that has order # as a text field in a table. The user adds a new #... I want to check against an existing table to see if the Order # they typed in is a Duplicate of one in the table, if it is, it displays a message saying Duplicate and to reenter a new Order #.

    I thought by having something like this:

    DLookup(“Order #”, “Part_Orders”, “Order #" = ??)

    I am lost...

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Close, try DCount()
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2002
    Préverenges, Switzerland
    the ?? part (DCount or Dlookup):

    if order# is a number
    "[Order #] = " & yourTextBox

    if order# is string
    "[Order #] = '" & yourTextBox & "'"

    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts