Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2004

Tip: Looking for answers? Try searching our database.

Formula on Main Report Using a Field from Subreport

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brent - 28 Oct 2004 00:05 GMT
I have two fields on a subreport named HRSWKD & TTLRPCS.  I have one field on
my main report named RPCS.  All of these are in the detail section.  My
formula on my main report needs to be:

=(RPCS/TTLRPCS)*HRSWKD

but I do not know how to format it correctly.  If someone could help me it
would be most appreciated.
Marshall Barton - 28 Oct 2004 01:10 GMT
>I have two fields on a subreport named HRSWKD & TTLRPCS.  I have one field on
>my main report named RPCS.  All of these are in the detail section.  My
[quoted text clipped - 4 lines]
>but I do not know how to format it correctly.  If someone could help me it
>would be most appreciated.

The way to refer to the value of the HRSWKD control in a
subreport is:

    subreportcontrolname.Report.HRSWKD

Signature

Marsh
MVP [MS Access]

Brent - 28 Oct 2004 19:07 GMT
For some reason this is not working for me.  Any idea why???

> >I have two fields on a subreport named HRSWKD & TTLRPCS.  I have one field on
> >my main report named RPCS.  All of these are in the detail section.  My
[quoted text clipped - 9 lines]
>
>     subreportcontrolname.Report.HRSWKD
Marshall Barton - 28 Oct 2004 23:47 GMT
Not without some more clues.  At least explain what you mean
by "not working".
Signature

Marsh
MVP [MS Access]

>For some reason this is not working for me.  Any idea why???
>
[quoted text clipped - 11 lines]
>>
>>     subreportcontrolname.Report.HRSWKD
Brent - 29 Oct 2004 01:05 GMT
When I put:  

ARLSetterAgentSubreport.Report.TTLRPCS

It asks me for parameter values.

> Not without some more clues.  At least explain what you mean
> by "not working".
[quoted text clipped - 13 lines]
> >>
> >>     subreportcontrolname.Report.HRSWKD
Marshall Barton - 29 Oct 2004 04:08 GMT
That means you used the wrong  or a misspelled name for the
subreport control or the control in the subreport.  It could
also mean you forgot the = sign.
Signature

Marsh
MVP [MS Access]

>When I put:  
>
[quoted text clipped - 20 lines]
>> >>
>> >>     subreportcontrolname.Report.HRSWKD
Brent - 29 Oct 2004 21:24 GMT
OK.  When I look at the properties for the subreport the Source Object is:  

Report.ARLSetterAgentSubreport

I put:

=ARLSetterAgentSubreport.Report.TTLRPCS

as the control source for my text box.  TTLRPCS is the name of the text box
on the subreport.  It is still asking me for parameters.  Any other reason
this would happen???

> That means you used the wrong  or a misspelled name for the
> subreport control or the control in the subreport.  It could
[quoted text clipped - 23 lines]
> >> >>
> >> >>     subreportcontrolname.Report.HRSWKD
Marshall Barton - 29 Oct 2004 23:43 GMT
It would have helped you had posted the parameter it's
prompting for.  It's probably prompting for
    ARLSetterAgentSubreport
which you said is the subreport control's SourceObject
property.

You need to use the subreport control's Name property.
They're often the same, but not always.
Signature

Marsh
MVP [MS Access]

>OK.  When I look at the properties for the subreport the Source Object is:  
>
[quoted text clipped - 36 lines]
>> >> >>
>> >> >>     subreportcontrolname.Report.HRSWKD
Brent - 30 Oct 2004 01:14 GMT
I should have known that.  I don't think I have ever changed the name of a
subreport but in this case I did.  I knew it was something simple I was
overlooking.  Thank you for taking time to help me.

> It would have helped you had posted the parameter it's
> prompting for.  It's probably prompting for
[quoted text clipped - 44 lines]
> >> >> >>
> >> >> >>     subreportcontrolname.Report.HRSWKD
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.