Sub Forms

R

Ron

I have form that has two sub-forms. The two sub forms are are from the same
table just with different information. I want to be able to see the
information on sub form 2 when i click on a record in sub form 1. Can some
one helpme with this.

Both sub forms are related to the main form.

Ex. sub form info has ID, Subject, Date Due, Date Closed. Sub-form 2 has
Validation results, validate by and date validated.

So when I click on one record in sub form 1 that has subject, date due, the
rest of th information related to the information is displayed in sub form 2.

If some one can helpme withthis that would be great.
 
K

Ken Snell \(MVP\)

What is the relating key between the data in Subform1 and Subform2? Subject?

Assuming that it's Subject, here is how you set this up:

Put an invisible textbox on the main form; name the textbox
"txtSubform2Key". Put this expression as its ControlSource (replace generic
name NameOfSubform1Control with the actual name of the subform control that
holds Subform1):
=[NameOfSubform1Control].[Form].[Subject]

Then go to the Properties window, and select the Subform2 control. On the
Data tab, you already have ID in the LinkChildFields and the
LinkMasterFields properties, right? Add this to the end of that string in
the LinkMasterField property:
;[txtSubform2Key]

Add this to the end of the string in the LinkChildFields property:
;[Subject]

Now you should see Subform2 coordinated with Subform1.
 
R

Ron

This did not work. Maybe I did not explain good enough.

I have a table that is used for both of the sub forms is the same. I have
split up the table into two differnet forms. One form called CAR Actions this
is a contious form and the other form Validation is a single form.

I have a main form that have tabs that are labeled Detail, Corrective action
etc. On one tab I have a sub form CAR Actions. Below this sub form I have a
sub form that is called validation.

The way it is set up now is that both subform are related to the main form
which shows the information i want. When you view the information you can see
the CAR actions as the contious form and the validation form shows single
form. What I want is that when you click on one of the lines in CAR Actions
sub form if there is informtion filled in the table for vallidation that it
is then shown on the validation sub form.

Ken Snell (MVP) said:
What is the relating key between the data in Subform1 and Subform2? Subject?

Assuming that it's Subject, here is how you set this up:

Put an invisible textbox on the main form; name the textbox
"txtSubform2Key". Put this expression as its ControlSource (replace generic
name NameOfSubform1Control with the actual name of the subform control that
holds Subform1):
=[NameOfSubform1Control].[Form].[Subject]

Then go to the Properties window, and select the Subform2 control. On the
Data tab, you already have ID in the LinkChildFields and the
LinkMasterFields properties, right? Add this to the end of that string in
the LinkMasterField property:
;[txtSubform2Key]

Add this to the end of the string in the LinkChildFields property:
;[Subject]

Now you should see Subform2 coordinated with Subform1.
--

Ken Snell
<MS ACCESS MVP>



Ron said:
I have form that has two sub-forms. The two sub forms are are from the
same
table just with different information. I want to be able to see the
information on sub form 2 when i click on a record in sub form 1. Can some
one helpme with this.

Both sub forms are related to the main form.

Ex. sub form info has ID, Subject, Date Due, Date Closed. Sub-form 2 has
Validation results, validate by and date validated.

So when I click on one record in sub form 1 that has subject, date due,
the
rest of th information related to the information is displayed in sub form
2.

If some one can helpme withthis that would be great.
 
K

Ken Snell \(MVP\)

When you say "did not work", could you tell us exactly what you did to try
my suggestion? What I suggested is the way to set up coordinated
subforms....

--

Ken Snell
<MS ACCESS MVP>


Ron said:
This did not work. Maybe I did not explain good enough.

I have a table that is used for both of the sub forms is the same. I have
split up the table into two differnet forms. One form called CAR Actions
this
is a contious form and the other form Validation is a single form.

I have a main form that have tabs that are labeled Detail, Corrective
action
etc. On one tab I have a sub form CAR Actions. Below this sub form I have
a
sub form that is called validation.

The way it is set up now is that both subform are related to the main form
which shows the information i want. When you view the information you can
see
the CAR actions as the contious form and the validation form shows single
form. What I want is that when you click on one of the lines in CAR
Actions
sub form if there is informtion filled in the table for vallidation that
it
is then shown on the validation sub form.

Ken Snell (MVP) said:
What is the relating key between the data in Subform1 and Subform2?
Subject?

Assuming that it's Subject, here is how you set this up:

Put an invisible textbox on the main form; name the textbox
"txtSubform2Key". Put this expression as its ControlSource (replace
generic
name NameOfSubform1Control with the actual name of the subform control
that
holds Subform1):
=[NameOfSubform1Control].[Form].[Subject]

Then go to the Properties window, and select the Subform2 control. On the
Data tab, you already have ID in the LinkChildFields and the
LinkMasterFields properties, right? Add this to the end of that string in
the LinkMasterField property:
;[txtSubform2Key]

Add this to the end of the string in the LinkChildFields property:
;[Subject]

Now you should see Subform2 coordinated with Subform1.
--

Ken Snell
<MS ACCESS MVP>



Ron said:
I have form that has two sub-forms. The two sub forms are are from the
same
table just with different information. I want to be able to see the
information on sub form 2 when i click on a record in sub form 1. Can
some
one helpme with this.

Both sub forms are related to the main form.

Ex. sub form info has ID, Subject, Date Due, Date Closed. Sub-form 2
has
Validation results, validate by and date validated.

So when I click on one record in sub form 1 that has subject, date due,
the
rest of th information related to the information is displayed in sub
form
2.

If some one can helpme withthis that would be great.
 

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