Click to See Complete Forum and Search --> : display format


goatboy
11-07-2003, 02:02 PM
could someone point my in the right direction here...
I'm trying to display the contents of a CD database (Access) in the following format:

CD Title1

track1
track2
track3

CD Title2

track2.1
track2.2
track3.3

..and so on,

the tables are:
CD: cdNo, title
Tracks: cdNo, track

ok, now I know what I've got aint doing it properly but ....
SQL statement: SELECT Distinct cds.title, tracks.tracks FROM cds INNER JOIN tracks ON cds.cdNo = tracks.cdNo

then I print out the title and use a while not EOF to display the rest of the records.
this gives me the (obviously) wrong format of:

CD Title 1

track1
track2
track3
track2.1
track2.2
track2.3

I cant get the logic of how to display the track listings under the relevent cd titles.

can anyone help?
thanks.

chrismartz
11-08-2003, 06:05 PM
have cd title 2 be in between track 3 of title 1 and track 1 of title 2 in your database..Hope this works

goatboy
11-09-2003, 02:28 PM
thanks bro, but I've just kicked its ass!!! its funny, how you can (well, I can) sit for a few hours unable to think past a certain mindset then go away and do something else and BOOM! there it is :D