I have a movie database program that I would like for my movies to be sorted by there genre, I can get it to work partially but it still doesn't sort all of them out correctly.
anyway, I have 2 tables in my database the genre table witch lists the genres on the treeview like
Action
Adventure
Ect...
Ect...
and the movies table witch has the movies names genre and so on, my problem is that in my movies table the genre is stored like so (Action§Adventure§Comedy§) and I can't figure out how to make my code read them and sort them correctly
heres is my code that I have tried but doesn't work correctly
also my code is in a module if that helps any
VB Code:
Case "Genre" rsGenre.MoveFirst Do While Not rsGenre.EOF nodeX2.Text = Split(nodeX2.Text, "§") Set nodeX2 = treView.Nodes.Add("Collection", tvwChild, rsGenre.Fields("Genre"), rsGenre.Fields("Genre"), "Closed") nodeX2.Tag = "G|" & rsGenre.Fields("Genre") rsGenre.MoveNext Loop rsMovies.MoveFirst Do While Not rsMovies.EOF strTemp = rsMovies.Fields("Genre") Set nodeX = treView.Nodes.Add(strTemp, tvwChild, , rsMovies.Fields("Title"), "File") nodeX.Tag = "T|" & rsMovies.Fields("MovieID") rsMovies.MoveNext Loop GoTo Finished


Reply With Quote
