| |
rahul27
Posts: 19
Score: 0
Joined: 5/23/2001
From: India
Status: offline
|
First of all is much faster to pass a SQL statemne then looping through and testing for values. And if you want just one occurance of an item use DistinctRow: So if there are 20 records and 10 of them are "Smith" and 5 are "Jones" and 5 are "Rayfield" then you will only see 3 items in your dropdown. One Smith, one jones and one Rayfield. SQLString = "Select DistinctRow Field1 From yourTable Where something = Somethingelse" then create a loop where is puts just those 3 records in your Selection box Set ors.open(SQLString) <% do while not ors.eof %> <option><% =ors.fields("Field1").value %> </option></font> <% ors.movenext loop Not sure what kind of database you are opening so my "Set" statement may not be right.
|
|