how do i link two forms

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

Guest

Hi Everyone,
Here's my question.i have created a class management database, wherein i
have two forms called Students form and Class form.in class form i have a
command button which takes me to a particular student's form.in student form,
i need to show only those classes for which this student has signed up
for.but as of now, my student form shows just all the classes present..i know
this is got to do with event and Visual Basic.. but i have no idea how to do
it..
Please Help!! Its Urgent!!!
 
There is two ways of doing this.

1.) Make the classes form a sub form in the student form and Set the Link
Master Fields property on the sub form to the field name(s) that contains the
data common to the sub form. Set the Link Child Fields property on the sub
form to
the field name(s) that contains the data common to the field(s) in the Link
Master Fields property.

2.) When you open the student form set the where condition to match the
selected student. I.e. DoCmd.OpenForm "Student Form", , ,"Name = 'John Doe'"

Of course with either solution you will need a table that defines which
classes each student has.
 
thanks!!
I wud try this and get back to u..


AutomationGuru said:
There is two ways of doing this.

1.) Make the classes form a sub form in the student form and Set the Link
Master Fields property on the sub form to the field name(s) that contains the
data common to the sub form. Set the Link Child Fields property on the sub
form to
the field name(s) that contains the data common to the field(s) in the Link
Master Fields property.

2.) When you open the student form set the where condition to match the
selected student. I.e. DoCmd.OpenForm "Student Form", , ,"Name = 'John Doe'"

Of course with either solution you will need a table that defines which
classes each student has.
 
Back
Top