Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Referencing a subform control on a subreport

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Table Linking Code Problem  
Author Message
Yam84

External


Since: Dec 11, 2008
Posts: 1



(Msg. 1) Posted: Thu Dec 11, 2008 11:37 am
Post subject: Referencing a subform control on a subreport
Archived from groups: microsoft>public>access (more info?)

Hello,

I would like to copy a calculated control of an unbound control on to
a report. On my form (F_SampleRequest) i have a button which opens
the report. Here is the code for the button:

Private Sub btnOpenSampleReport_Click()

DoCmd.OpenReport "R_SampleRequest"
'Open Report SampleRequest


Reports!R_SampleRequest.SR_SampleReqRep.Report!txtRptWat =
SF_MixSample.Form!ListWater
Reports!R_SampleRequest.SR_SampleRequest.Report!txtRptWaterReq =
SF_MixSample.Form!txtWaterReqWt

End Sub

My report contains a subreport (SR_SampleReqRep) which has 2 text
boxes (ListWater and txtwaterReqWt) which I wish to be copied into
from the SF_mixSample subform. This code prints the report as opposed
to copying the information into the report. I have used similar code
to copy from one form to the next, so I thought i could do the same
with a report and subreport. How can I copy a value from a subform
to a subreport?

 >> Stay informed about: Referencing a subform control on a subreport 
Back to top
Login to vote
g

External


Since: Dec 11, 2008
Posts: 1



(Msg. 2) Posted: Thu Dec 11, 2008 2:14 pm
Post subject: RE: Referencing a subform control on a subreport
Archived from groups: per prev. post (more info?)

Hi, Just giving your problem a try.

On your fields at sub report enter on each control source

For ListWater:
=Forms!YourMainFormName.SF_MixSample.Form.ListWater

For txtwaterReqWt
=Forms!YourMainFormName.SF_MixSample.Form.txtWaterReqWt



"Yam84" wrote:

> Hello,
>
> I would like to copy a calculated control of an unbound control on to
> a report. On my form (F_SampleRequest) i have a button which opens
> the report. Here is the code for the button:
>
> Private Sub btnOpenSampleReport_Click()
>
> DoCmd.OpenReport "R_SampleRequest"
> 'Open Report SampleRequest
>
>
> Reports!R_SampleRequest.SR_SampleReqRep.Report!txtRptWat =
> SF_MixSample.Form!ListWater
> Reports!R_SampleRequest.SR_SampleRequest.Report!txtRptWaterReq =
> SF_MixSample.Form!txtWaterReqWt
>
> End Sub
>
> My report contains a subreport (SR_SampleReqRep) which has 2 text
> boxes (ListWater and txtwaterReqWt) which I wish to be copied into
> from the SF_mixSample subform. This code prints the report as opposed
> to copying the information into the report. I have used similar code
> to copy from one form to the next, so I thought i could do the same
> with a report and subreport. How can I copy a value from a subform
> to a subreport?
>

 >> Stay informed about: Referencing a subform control on a subreport 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SUBFORM was working and now it's not - Hi, My subform (order details) in a purchase order has been working and now is not. I have not made any changes to either form or subform... so I'm baffled as to why it would suddenly stop working. What it is doing (or more accurately not doing): ...

Subform not allowing update - Hi, I'm sure there is a simple answer to this, but for some reason my subform isn't allowing me to add records and I'm not sure why. I've gone through this set up a few times and I have previously been able to add records. Is there a common pitfall..

Entering records on a subform - I have read topics related to my problem but I can't seem to find a solution. I have a form that has a combo box containing events. The records for the combo box come from a query. After selecting an event, a subform is populated with staffing..

subform not opening in add mode - I can't figure out why my subform is not loading in add mode when my main form is in add mode. Both forms are based on seperate tables and the record sources have one to many relationships. My subform's Data Entry property is set to "NO". ...

Subform causing duplicate records? - I am trying to do a Purchase Order database. I need a subform in the PO Data Entry Form since there are usually multiple items in the PO. I have a command button to Print PO but I end up with a report for each item in the subform. This is the SQL...
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]