Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Prevent a duplicate entry

    We use authorization numbers that are pre-generated and I am trying to keep users from entering a duplicate entry with the same number. I want the form to automatically identify that the number has already been used. Any ideas on how to get the form to have a message tell users that this number has already been used? Any help would be greatly appreciated.

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Re: Prevent a duplicate entry

    Originally posted by tahuero
    We use authorization numbers that are pre-generated and I am trying to keep users from entering a duplicate entry with the same number. I want the form to automatically identify that the number has already been used. Any ideas on how to get the form to have a message tell users that this number has already been used? Any help would be greatly appreciated.
    Are you saying that these numbers are going to automatically be unique but you want to make sure users don't add the same info to more than one record? Or...are the authorization numbers not necessarily unique?

    To see if a number has already been used, you can easily use code to search a recordset.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  3. #3
    Join Date
    Mar 2004
    Posts
    3

    Re: Prevent a duplicate entry

    Originally posted by basicmek
    Are you saying that these numbers are going to automatically be unique but you want to make sure users don't add the same info to more than one record? Or...are the authorization numbers not necessarily unique?

    To see if a number has already been used, you can easily use code to search a recordset.

    We have a different software that generates Auth #'s. Once an Auth # is issued then the information is keyed into a database. From time to time, some people pick up the paperwork and begin inputting the information in again.

    The Auth # is unique, but is not an autonumber generated by access.

    I have not used recordset and am not sure on how to go about integrating it. Thanks!

  4. #4
    Join Date
    Feb 2004
    Posts
    142
    The easiest way is to create a unique index on that field. Then Access will prevent users from reentering the same number again.
    KC

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    Originally posted by AZ KC
    The easiest way is to create a unique index on that field. Then Access will prevent users from reentering the same number again.
    Thanks basicmek and AZ KC.... I wrote a macro to validate the information that works within the form. This is working as I wanted.


    The unique index on the field was not working for since it is a text field. In any case the macro is working like I need.


    Thanks again!

Posting Permissions

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