Click to See Complete Forum and Search --> : Dynamic Menu Problem


jazzy639
05-10-2005, 03:25 PM
Hello,

I have a dynamic menu which should display usernames. Then when I click go, it displays records from the suer.

The problem is that users have multiple records so the same user is shown multiple times.

How can I get it to not display duplicates?

Here is the code:
<option value="<%=(bookings.Fields.Item("teachersname").Value)%>"><%=(bookings.Fields.Item("teachersname").Value)%></option>
<%
bookings.MoveNext()
Wend
If (bookings.CursorType > 0) Then
bookings.MoveFirst
Else
bookings.Requery
End If
%>
</select>
<input type="submit" name="Submit" value="Go">
</form>

Thanks

jazzy639
05-10-2005, 03:58 PM
Does anyone have any ideas?

Thanks

wmif
05-10-2005, 05:00 PM
wow, barely 30 mins and you are getting impatient.

buntine
05-10-2005, 09:40 PM
Add DISTINCT to your SQL query.

SELECT DISTINCT userName from usersTable;

Just implement that example into your current SQL query.