PDA

Click to See Complete Forum and Search --> : Remove duplicates from list box


Rob Brown
May 15th, 2000, 08:22 PM
Hi,

I want to place a list/combo box on a form to look up a column in my database.

However the column contains multiple duplicates and I don't want to be able to see these.

I only want to be able to see any individual value once.

If it is repeated in the database then I don't want to be able to see the duplicate(s).

Someone told me how to do this once before but I can't remember how it's done.

Can anybody help?

Best Regards,

Rob Brown.

Ianpbaker
May 15th, 2000, 08:25 PM
Hi Rob

Is your Box bound to a control source or are you Using A SQL statement for the row source?

Rob Brown
May 15th, 2000, 08:33 PM
I haven't created it yet so I suppose it doesn't really matter.

Which way is easier?

Ianpbaker
May 15th, 2000, 08:39 PM
If you Set the row source to "SELECT DISTINCT * FROM tbltest", providing you have a Primary key set up, it will return just One occurance of the record. You can do the same also with a control source. Instead of linking it straight to the table make it the same as above. Either way it does the job.

Hope This helps

Ian