Multiple records for one field through a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is exactly what I am trying to do. I am making a database for CD's that is linked through the artist name. This is more of a side project than anything but I am wanting to use the form to enter in the Artist name, CD Title, Label, Release date, and Song Titles. I have a subform setup to enter the song titles in but I am not really sure how to enter in say 15 songs for one album. I am wanting the table or report to list the songs by the album when I am finished.

It tells me that I cannot have a null value in the primary key, so I guess I am confused on how the subform works. I thought that it was linked to the main form so that the information entered into the main form was assumed for the subform. And I am wanting it to either: relist the information for all of the other fields with each song, or enter the songs into their own table that will tie itself to each album title. If this is too long of a question I am sorry, I am just having trouble finding the right help.

Thanks,
Marcus
 
Here is exactly what I am trying to do. I am making a database for CD's that is linked through the artist name. This is more of a side project than anything but I am wanting to use the form to enter in the Artist name, CD Title, Label, Release date, and Song Titles. I have a subform setup to enter the song titles in but I am not really sure how to enter in say 15 songs for one album. I am wanting the table or report to list the songs by the album when I am finished.

It tells me that I cannot have a null value in the primary key, so I guess I am confused on how the subform works. I thought that it was linked to the main form so that the information entered into the main form was assumed for the subform. And I am wanting it to either: relist the information for all of the other fields with each song, or enter the songs into their own table that will tie itself to each album title. If this is too long of a question I am sorry, I am just having trouble finding the right help.

You should step back and look at your table structure: designing forms
first is a sure way to get into trouble, as you're doing!

You need (at least, for a thorough music database several more) two
tables:

CDs
CD_ID
Title
<other info about the CD as a whole>

Tracks
CD_ID <link to CDs>
TrackNo
SongTitle
Artist

CD_ID would be the master/child link field.

To be thorough, you'ld have an Artists table, and allow for the fact
that a given track might have several artists (I'm listening to a very
nice Beethoven string quartet right now... with four artists).
 
I have the two tables. But I am trying to link my the artist name, so you wouldnt recommend something like that? So if I make the suggested changes, then how do I enter multiple songs for one CD_ID

Thanks again
Marcu

----- John Vinson wrote: ----

On Tue, 24 Feb 2004 12:46:13 -0800, Marcus <[email protected]
wrote
Here is exactly what I am trying to do. I am making a database for CD's that is linked through the artist name. This is more of a side project than anything but I am wanting to use the form to enter in the Artist name, CD Title, Label, Release date, and Song Titles. I have a subform setup to enter the song titles in but I am not really sure how to enter in say 15 songs for one album. I am wanting the table or report to list the songs by the album when I am finished

You should step back and look at your table structure: designing form
first is a sure way to get into trouble, as you're doing

You need (at least, for a thorough music database several more) tw
tables:

CD
CD_I
Titl
<other info about the CD as a whole

Track
CD_ID <link to CDs
TrackN
SongTitl
Artis

CD_ID would be the master/child link field

To be thorough, you'ld have an Artists table, and allow for the fac
that a given track might have several artists (I'm listening to a ver
nice Beethoven string quartet right now... with four artists)

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=publi
 
I have the two tables. But I am trying to link my the artist name, so you wouldnt recommend something like that? So if I make the suggested changes, then how do I enter multiple songs for one CD_ID?

If you have a table of artists you need AT LEAST FOUR tables, not two:

CDs
Tracks
Artists
ArtistOnTrack

To enter multiple songs for one CD_ID, you would enter multiple
records in the Tracks table for that CD_ID (using a Subform).
 
Back
Top