Auto Population

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hey, I'm a newbie (2 days) and am trying to build a
simple db so it can learn how to do stuff for a larger
one.

I have created two forms (one main and the other a sub)
and need two of the fields on the sub-form to be auto-
populated with two of the fields from the main form. For
example: I enter a music cd's artist and album into the
main form, click on the "sub-form button" to activate
tohe sub form, and the same two fields need to be
populated in the sub-form (yes, I realize this will
create all kinds of redundantcy, but it needs to be like
this to show the track listings associated with the
Artist and album in the table). Any help would be
appreciated. Thanks in advance,

-Chris
 
you are not using normalized database structures here. Each CD should have
a unique number assigned to it. The table that stores your tracks should
also have that number. That is what would tie them together. The subform
you mentioned would only display the track information, not any redundant
info from the main form (since it will be right there on your screen in the
main form. This is done using the parent/child field or a WHERE clause.
There are several examples in the sample Northwinds Database.

Your tables might look like:

TblCD: CDRefNumber, CDTitle, CDArtist, CDPrice, Comments, MyRanking,
etc...

TblTracks: CDRefNumber, TrackSeqNumber, TrackTitle, TrackDuration

Note that the key to each is the "CDRefNumber".

Trust me, if you don't get this concept down now and try to write a much
larger database you will regret it.


HTH
Rick



Hey, I'm a newbie (2 days) and am trying to build a
simple db so it can learn how to do stuff for a larger
one.

I have created two forms (one main and the other a sub)
and need two of the fields on the sub-form to be auto-
populated with two of the fields from the main form. For
example: I enter a music cd's artist and album into the
main form, click on the "sub-form button" to activate
tohe sub form, and the same two fields need to be
populated in the sub-form (yes, I realize this will
create all kinds of redundantcy, but it needs to be like
this to show the track listings associated with the
Artist and album in the table). Any help would be
appreciated. Thanks in advance,

-Chris
 
Back
Top