473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Referring to a control in a subform on a subreport

166 100+
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!txt RptWat =
SF_MixSample.Form!ListWater
Reports!R_SampleRequest.SR_SampleRequest.Report!tx tRptWaterReq =
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?
Dec 11 '08 #1
3 2556
nico5038
3,080 Expert 2GB
For all information on referring to form controls check:
Forms: Refer to Form and Subform properties and controls
(Much other interesting stuff there!)

On the other hand, when calculated on a form you could also add the calculation in the (sub)report's query and to transfer is needed.

Nic;o)
Dec 11 '08 #2
csolomon
166 100+
Each of the controls I need are unbound, so I can't refer to them in the query, which is why I just wanted to xfer it.

That link refers to forms but I need the information related to reports.
Dec 11 '08 #3
nico5038
3,080 Expert 2GB
Just read for form report and subform subreport :-)

I do understand that a calculated value is stored in an unbound field, but the calculation will use fields from a table I assume. That calculation can be placed in a query.

Nic;o)
Dec 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dee | last post by:
I have a form which contains basics of a customer's order from table . I placed a tab control on this form which is still empty. I'm trying to design a project management database and would like...
3
by: Illya Havsiyevych | last post by:
Hello All I have splitted my MDB into MDE and data MDB. In old whole MDB I have next piece of code to create an instance of a form with subform. ..... Dim objForm As New ...
2
by: Salad | last post by:
I have a sub routine that I'd like to use to get data from a main form or from a subform preferably using 1 variable. Ex: If Me.OpenArgs = "SF" Then strForm = "MF!SF" Else strForm = "MF"...
1
by: Kirsty Ryder | last post by:
Hi, I have a Report with a subreport, and I want to assign a value to the control source of a control on the subreport depending on the value given by the user in a separate form. Based on...
2
by: nathanwalsh | last post by:
What are some of the differences between subforms and subreports? Here's my problem: I've got a form that lists a group of technicians. The main form lists basic information (name, job title, etc)...
3
by: Steven | last post by:
OK.. Here's my situation. I have a subform on a parent form. When the parent form is loaded, the subreport queries data from a table in the DB. The parent form has a couple of text boxes for data...
4
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The...
6
NeoPa
by: NeoPa | last post by:
Introduction The first thing to understand about Sub-Forms is that, to add a form onto another form takes a special Subform control. This Subform control acts as a container for the form that you...
25
by: hjozinovic | last post by:
Hi! I have a MainForm and a SubForm on it. They're linked and can be filtered, sorted etc... I designed MainReport and SubReport that should match filter and sort criteria from MainForm and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.