in what program/language ?
Im trying to display the info i have in a databse. For example when i retrieve data from a field called "Artist" and i get the listing of Artists but the same name will show repetitavly. How can i get the artists to show once in the listbox or listview? Hope someone can help.
Thanks in advance.........
in what program/language ?
I consider that our present sufferings are not worth comparing with the glory that will be revealed in us.
www.neoterikos.com
I think some of your code would be necessary in order to really answer your question. I don't know VB6 anyways.. so
I consider that our present sufferings are not worth comparing with the glory that will be revealed in us.
www.neoterikos.com
post it. I'll show you
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
Originally Posted by frodobaggins
Set rs = New ADODB.Recordset
' ----------------------------
If Option1.value = True Then
rs.Open ("select * from media where Artist like '" & Text1.Text & "%' order by artist"), dbCon
While Not rs.EOF
lstMedia.AddItem rs("Artist")
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
End If
LstMedia is a simple listbox. Should i be using somthign else instead like a listview or grid possibly?
Thanks frodo.....
You will want to do the following:
Set rs = New ADODB.Recordset
' ----------------------------
If Option1.value = True Then
rs.Open ("SELECT DISTINCT artist FROM media WHERE artist like '" & Text1.Text & "%' order by artist"), dbCon
While Not rs.EOF
lstMedia.AddItem rs("Artist")
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
End If
This should then only pull out the unique artists that match the description
Garry
Co-Developer of A.I.M.E.E
www.aimee.cc
Not a problem, glad I can help
Garry
Co-Developer of A.I.M.E.E
www.aimee.cc
BastardI was asleep !
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
Bookmarks