Results 1 to 2 of 2
  1. #1
    pkg206 is offline Novice
    Windows 2K Access 2003
    Join Date
    Nov 2009
    Location
    India
    Posts
    3

    combo box - no duplicates

    Hi,



    I have a database of say 500 employees working is say 25 departments. I created a combobox in a form to lookup a value from the table and selected the field department from the database table with ascending sorting over the field. The combobox is working fine but the problem is that repeated entries are showing in combobox. Like in department A say 10 persons are working and likewise in another departments and when I click at combobox, it 10 times shows department A and I want that it may show it only one time and if there are duplicacy of any value in that field than only once the combobox should show the value. Pl. help

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    well 2 ways to skin this cat:
    a combobox's record source is a query - look in properties of it...and open the record source - which will be a query in design view...and then go to View / Properties and make it a Distinct Query by changing the Unique Values property to yes. b.t.w. - this is not the most intuitive location for this and what you see in the query's property will depend on where your cursor is when you open it...takes a little getting use to...

    on the otherhand you are looking into a very large table to only select among 25 departments...it might be simpler to just make a Departments Table...populate the 25 entries - and resource the combobox on this new table.... on the thirdhand - - if new departments are created on-the-fly by the data entries - then this static table isn't the way to go....

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

Similar Threads

  1. How to remove duplicates
    By TonyBender in forum Access
    Replies: 0
    Last Post: 10-21-2009, 10:27 PM
  2. Deleting Duplicates
    By TundraMonkey in forum Queries
    Replies: 4
    Last Post: 09-08-2009, 07:13 AM
  3. Pulling out duplicates
    By FREEEEEEDOM in forum Access
    Replies: 1
    Last Post: 04-21-2009, 10:37 PM
  4. Hide Duplicates with Group Headers
    By diwin in forum Reports
    Replies: 0
    Last Post: 03-26-2009, 09:32 AM
  5. Replies: 1
    Last Post: 05-27-2006, 12:35 PM

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