Drop-down from DB w/out duplicates

Results 1 to 3 of 3

Thread: Drop-down from DB w/out duplicates

  1. #1
    maniacalloon Guest

    Default Drop-down from DB w/out duplicates

    I have been looking for a way to populate a drop down menu with information from a MSAccess database. I can do this, but what I can&#039t figure out is how to populate it with non-duplicate values. For example, if my projects table has a field called "type" where each job is given a type designation such as medical, retail, remodel, etc. those types would appear multiple times in the drop down menu. what I need is a way to take each value from that column only once so I won&#039t have "medical" on the list twice, for example. Any ideas/advice would be greatly appreciated. Thanks! <BR><BR>--maniacalloon--

  2. #2
    Anastasis Guest

    Default RE: Drop-down from DB w/out duplicates

    HEY! I just realized that I did this sort of thing within the past few days! It feels good to be able to help a fellow programmer!<BR><BR>Here is what I did: If you KNOW those field values (medical, retail, etc.) then put them in a separate table. I did this with my site - the bookswap one (read my SQL JOIN reply). Each book that a user adds will have a "condition" - excellent, good, fair, and poor. I put these four "conditions" in a separate, single, small "conditions" table and populated my drop down menu from that.<BR><BR>I recently even read a more efficient way to do this than with a loop, and when I find the page, Ill post it!<BR><BR>I hope this helps you!<BR><BR>Good luck, God bless, and Great programming!<BR>Anastasis

  3. #3
    Anastasis Guest

    Default That site I just mentioned....

    I just mentioned a webpage that describes a more efficient method of populating webpage forms with db values.....<BR>Here it is....<BR>http://www.aspfaqs.com/webtech/121598-1.shtml<BR><BR>I hope it helps!<BR>Good luck, God bless, and Great Programming!<BR>Anastasis<BR><BR>p.s. kewl name!

Posting Permissions

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