link subform?

  • Thread starter Shivalee Gupta via AccessMonster.com
  • Start date
S

Shivalee Gupta via AccessMonster.com

i have a form which shows name. i want a subform below it which shows me
his/her marks in a particular subject. if the name changes(it can be a
combo box), then his marks should also change.
how do i link my name with the subform?
please help!
 
G

G. Vaught

In order to link a subform with a main form you need a common field between
the two forms. For instance, the main form should have a primary key (unique
value, never repeated) that also appears in the table behind the subform
(can be repeated). Thus if your subform is marks for a particular subject,
then the table which records this info must have the same primary key field
that your main form has, which actually becomes the 'foreign key'. This
links say students to the grades they received.

Once this relationship has been established you can create the relationship
between the two tables involved in the relationship window, a icon on the
menu bar of Access. If you are not familiar with this concept, I would
recommend reading up on the subject before trying to establish this in your
database. Access is the one Office application where learning how to use it
properly has a steeper overall learning curve than any other Office
application. If you ignore crucial subjects to learn such as, Referential
Integrity, Normalization, Relationships, you will create an unusable
database that is hard to maintain.
 
S

Shivalee Gupta via AccessMonster.com

i have done all. create 2 tables. one is primary key and the other is
foreign. i have linked them using relationships(also estableshed cascading
facilities). i am aware of all dbms and rdbms fundamentals.
all i am asking for is a linked subform! can u please provide code to me? i
am also using wizard but not getting required results.
thanks
 
Top