Serious Help Needed!!!

T

tmdrake

My question comes in two parts:

Part 1 - I have a Form with a subform (main subform) what when you double
click on a field in the subform another subform puts up. On that second
subform it sums the "Projected_Man_Hours" in a text box and
"Actual_Man_Hours" in another text box in the footer of the subform.
I would like to transfer the values from the two text boxes on the
second subform to two text boxes on the "Main subform" then two the Main Form.

To transfer the values for the second subform to the Main subform I am
using
=frmHour_Worked_subform![Projected_Man_Hours]!Form!Project_Staffing_Resources_subform

I am also most positive this is wrong. Please help.

Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.
 
R

ruralguy via AccessMonster.com

See if this link helps.
http://www.mvps.org/access/forms/frm0031.htm
My question comes in two parts:

Part 1 - I have a Form with a subform (main subform) what when you double
click on a field in the subform another subform puts up. On that second
subform it sums the "Projected_Man_Hours" in a text box and
"Actual_Man_Hours" in another text box in the footer of the subform.
I would like to transfer the values from the two text boxes on the
second subform to two text boxes on the "Main subform" then two the Main Form.

To transfer the values for the second subform to the Main subform I am
using
=frmHour_Worked_subform![Projected_Man_Hours]!Form!Project_Staffing_Resources_subform

I am also most positive this is wrong. Please help.

Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.
 
T

tmdrake

Thanks for the link, however when trying to use the Me!Subform1.Form!Control
Name statement I keep getting the #Name? error.

The Subform1 control name is frmHours_Worked_subform and the control that I
am referring to on the subform is Projected_Man_Hours.

This is the statement I am using on the Main form in a text box
=[Me]![frmHours_Worked_subform].[Form]![Projected_Man_Hours]. Please tell
what I am doing wrong.


I also understand that I have to make the control on the subform invisible
for it to show the results on the Main form, Is this correct?
--
tmdrake


ruralguy via AccessMonster.com said:
See if this link helps.
http://www.mvps.org/access/forms/frm0031.htm
My question comes in two parts:

Part 1 - I have a Form with a subform (main subform) what when you double
click on a field in the subform another subform puts up. On that second
subform it sums the "Projected_Man_Hours" in a text box and
"Actual_Man_Hours" in another text box in the footer of the subform.
I would like to transfer the values from the two text boxes on the
second subform to two text boxes on the "Main subform" then two the Main Form.

To transfer the values for the second subform to the Main subform I am
using
=frmHour_Worked_subform![Projected_Man_Hours]!Form!Project_Staffing_Resources_subform

I am also most positive this is wrong. Please help.

Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Forms are displayed on other forms by means of a SubFormControl. This
SubFormControl has a name of its own. It need not be named the same as the
form it is displaying although often it is. Try this syntax:
=SubFormControl.FORM.Projected_Man_Hours
...and see what happens. You know you are looking at the SubFormControl when
the properties sheet data tab shows the LinkChild/MasterFields properties.'

I do not believe visibility affects the results in any way.
Thanks for the link, however when trying to use the Me!Subform1.Form!Control
Name statement I keep getting the #Name? error.

The Subform1 control name is frmHours_Worked_subform and the control that I
am referring to on the subform is Projected_Man_Hours.

This is the statement I am using on the Main form in a text box
=[Me]![frmHours_Worked_subform].[Form]![Projected_Man_Hours]. Please tell
what I am doing wrong.

I also understand that I have to make the control on the subform invisible
for it to show the results on the Main form, Is this correct?
[quoted text clipped - 16 lines]
 
T

tmdrake

Thank you so much, it worked.
--
tmdrake


ruralguy via AccessMonster.com said:
Forms are displayed on other forms by means of a SubFormControl. This
SubFormControl has a name of its own. It need not be named the same as the
form it is displaying although often it is. Try this syntax:
=SubFormControl.FORM.Projected_Man_Hours
...and see what happens. You know you are looking at the SubFormControl when
the properties sheet data tab shows the LinkChild/MasterFields properties.'

I do not believe visibility affects the results in any way.
Thanks for the link, however when trying to use the Me!Subform1.Form!Control
Name statement I keep getting the #Name? error.

The Subform1 control name is frmHours_Worked_subform and the control that I
am referring to on the subform is Projected_Man_Hours.

This is the statement I am using on the Main form in a text box
=[Me]![frmHours_Worked_subform].[Form]![Projected_Man_Hours]. Please tell
what I am doing wrong.

I also understand that I have to make the control on the subform invisible
for it to show the results on the Main form, Is this correct?
[quoted text clipped - 16 lines]
Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

You're very welcome. Glad I could help.
Thank you so much, it worked.
Forms are displayed on other forms by means of a SubFormControl. This
SubFormControl has a name of its own. It need not be named the same as the
[quoted text clipped - 22 lines]
 
T

tmdrake

If this should be posted as a separate question, please let me know.

On that Main form, there are four combo boxes, where the user can select
from one or mutilple boxes, then hit the Select button and the results
display in the subform.
There is also a Clear All button that erases the selection(s) made; how do
I get it to also clear the text boxes that contain the references from the
subform. To clear the combo boxes it use the following code:
Private Sub Refresh_Click()
Me!DisciplineName = Null
Me!SectionNumber = Null
Me!ProjectID = Null
Me!LastName = Null
Call Select_Click

I tried adding Me!PHW = Null, but I get the following error:
Run-time Error '2448': You can't assign a value to this object.

Your help is greatly appreciated



--
tmdrake


ruralguy via AccessMonster.com said:
You're very welcome. Glad I could help.
Thank you so much, it worked.
Forms are displayed on other forms by means of a SubFormControl. This
SubFormControl has a name of its own. It need not be named the same as the
[quoted text clipped - 22 lines]
Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

What happens if you requery the SubForm?
If this should be posted as a separate question, please let me know.

On that Main form, there are four combo boxes, where the user can select
from one or mutilple boxes, then hit the Select button and the results
display in the subform.
There is also a Clear All button that erases the selection(s) made; how do
I get it to also clear the text boxes that contain the references from the
subform. To clear the combo boxes it use the following code:
Private Sub Refresh_Click()
Me!DisciplineName = Null
Me!SectionNumber = Null
Me!ProjectID = Null
Me!LastName = Null
Call Select_Click

I tried adding Me!PHW = Null, but I get the following error:
Run-time Error '2448': You can't assign a value to this object.

Your help is greatly appreciated
You're very welcome. Glad I could help.
[quoted text clipped - 4 lines]
 
T

tmdrake

When I requery the subform, the correct informations populate in the text
boxes. Only when I hit the clear button the text boxes is then populated
with the totals for all the records.

Let me back up. When I hit the clear button, the combo boxes clear but the
subform displays all the records in the table. I guess that is why the text
box does not clear. So I guess my question should be how do I clear the Main
form and the subform when the clear button is clicked.

I sure hope this makes sense. You have been very helpful.
--
tmdrake


ruralguy via AccessMonster.com said:
What happens if you requery the SubForm?
If this should be posted as a separate question, please let me know.

On that Main form, there are four combo boxes, where the user can select
from one or mutilple boxes, then hit the Select button and the results
display in the subform.
There is also a Clear All button that erases the selection(s) made; how do
I get it to also clear the text boxes that contain the references from the
subform. To clear the combo boxes it use the following code:
Private Sub Refresh_Click()
Me!DisciplineName = Null
Me!SectionNumber = Null
Me!ProjectID = Null
Me!LastName = Null
Call Select_Click

I tried adding Me!PHW = Null, but I get the following error:
Run-time Error '2448': You can't assign a value to this object.

Your help is greatly appreciated
You're very welcome. Glad I could help.
[quoted text clipped - 4 lines]
Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

If you clear your selection ComboBoxes and then Requery the SubForm, do all
of the records go away?
When I requery the subform, the correct informations populate in the text
boxes. Only when I hit the clear button the text boxes is then populated
with the totals for all the records.

Let me back up. When I hit the clear button, the combo boxes clear but the
subform displays all the records in the table. I guess that is why the text
box does not clear. So I guess my question should be how do I clear the Main
form and the subform when the clear button is clicked.

I sure hope this makes sense. You have been very helpful.
What happens if you requery the SubForm?
[quoted text clipped - 23 lines]
 
T

tmdrake

No, the subform show all the records in the table.
--
tmdrake


ruralguy via AccessMonster.com said:
If you clear your selection ComboBoxes and then Requery the SubForm, do all
of the records go away?
When I requery the subform, the correct informations populate in the text
boxes. Only when I hit the clear button the text boxes is then populated
with the totals for all the records.

Let me back up. When I hit the clear button, the combo boxes clear but the
subform displays all the records in the table. I guess that is why the text
box does not clear. So I guess my question should be how do I clear the Main
form and the subform when the clear button is clicked.

I sure hope this makes sense. You have been very helpful.
What happens if you requery the SubForm?
[quoted text clipped - 23 lines]
Part 2: I am trying to have the second subform export to excel. Not sure
what path to take by using a command button. Please Help.
 
R

ruralguy via AccessMonster.com

To achieve what you want you will either need to temporarily change the
ControlSource of the TextBox or maybe hide the real TextBox and subsitute a
blank one.
No, the subform show all the records in the table.
If you clear your selection ComboBoxes and then Requery the SubForm, do all
of the records go away?
[quoted text clipped - 14 lines]
 

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