how do i link two forms

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!!!
 
G

Guest

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top