Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    2

    Unhappy Unanswered: Checking for duplicates in a table

    Without using the index property or the duplicate query, how else can I find a duplicate record when the table is on the sqlserv (7)? I have a form that uses a dropdown list, once the item is selected I would like to check for a duplicate at that point before the record is updated or the error OBDC call failed.

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    you can do a few things to find dups, the easiest thing to do is write a simple query. select the field that you think you have dups in and then create a count column. ie select names
    ,count(*)
    From [table_name]
    order by count desc
    any count greater than 1 will be at the top of the list. you can do this in access in a normal query design view. thats the best way to find the dups, what to do with them....thats your call
    Regards

  3. #3
    Join Date
    Aug 2002
    Posts
    2
    Originally posted by JDionne
    you can do a few things to find dups, the easiest thing to do is write a simple query. select the field that you think you have dups in and then create a count column. ie select names
    ,count(*)
    From [table_name]
    order by count desc
    any count greater than 1 will be at the top of the list. you can do this in access in a normal query design view. thats the best way to find the dups, what to do with them....thats your call
    Regards
    That's my problem, getting the results of the query and comparing them to the recordset in VBA.

  4. #4
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Originally posted by willmstg


    That's my problem, getting the results of the query and comparing them to the recordset in VBA.
    What exactly are you trying to do? not get duplicates in your combo box?
    you can do that by going into the row source property and changing the select statment to say select distinct.
    If thats not what you are doing Im lost, could you please explane a bit more for me?

Posting Permissions

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