Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44

    Unanswered: How can I make a combobox show only one instance of a duplicate record

    How can I make a combobox show only one instance of a duplicate record, and hide the rest?
    Dani_30

  2. #2
    Join Date
    Nov 2003
    Location
    Riga, Latvia
    Posts
    36

    Re: How can I make a combobox show only one instance of a duplicate record

    Originally posted by stc834
    How can I make a combobox show only one instance of a duplicate record, and hide the rest?
    If you have a table, for example, tblCustomers, which for some reason might have duplicate customer records. If there is a unique identifier of a customer in that table, say, CustID column, then write a query

    select CustID
    from tblCustomers
    group by CustID
    having count(*)>1

    and use it as source for your combobox. The combobox will show CustID's which can be met more than once in the tblCustomers table.
    Replies based on my configuration: Windows XP / Microsoft Office Access 2003 unless specified otherwise.

  3. #3
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    You can do this too:

    SELECT DISTINCTROW [Tbl Vendedores].DENVEN
    FROM [Tbl Vendedores]
    WHERE ((([Tbl Vendedores].DENVEN) In (SELECT [DENVEN] FROM [Tbl Vendedores] As Tmp GROUP BY [DENVEN] HAVING Count(*)>1 )))
    ORDER BY [Tbl Vendedores].DENVEN;
    Saludos
    Norberto

Posting Permissions

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