[AccessD] Referencing Fields in Sub-Reports

Andy Lacey andy at minstersystems.co.uk
Wed May 18 08:46:34 CDT 2005


Mark, just use NZ, ie

Nz(rptSub1.Report.txtTextbox,0) + Nz(rptSub2.Report.txtTextbox,0)

--
Andy Lacey
http://www.minstersystems.co.uk



--------- Original Message --------
From: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: RE: [AccessD] Referencing Fields in Sub-Reports
Date: 18/05/05 13:43

>
> Thanks Andy and Gustav.
> Using the syntax "rptSub1.Report.txtTextbox +
rptSub2.Report.txtTextbox"
> seems to work.  Although, this only totals the values when there are
> legitimate values in each textbox.  If one of the boxes contains a null
> value, the report is showing "#Error" in the field.
> I'm thinking that I want to force the subform's textbox value to 0 if
> it's null, but this doesn't seem to be working.  I tried using
> "=IIf(IsNull([TextboxValue]),0,[TextboxValue])", but this still
displays
> a null value.
>
> Does this make sense?
> Thanks,
> Mark Boyd
> I/S Supervisor
> McBee Associates, Inc.
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: Wednesday, May 18, 2005 4:08 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Referencing Fields in Sub-Reports
>
> Hi Mark and Andy
>
> There used to be a document on the DBA site which listed how to
> reference parent and child forms and reports.
> Where did it go??
>
> But it should go like this:
>
>   Report!rptMain!<NameOfSubreportControl1>.Report!txtTextbox +
>   Report!rptMain!<NameOfSubreportControl2>.Report!txtTextbox
>
> /gustav
>
> >>> andy at minstersystems.co.uk 05/18 8:28 am >>>
> Mark
> I think the ref within rptMain would just be to
>
> Me.subrpt1.report!txt1
>
> Remembering that subrpt1 is the subform control within rptMain not the
> report name.
>
> -- Andy Lacey
> http://www.minstersystems.co.uk
>
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Boyd
> > Sent: 17 May 2005 22:59
> > To: AccessD at databaseadvisors.com
> > Subject: [AccessD] Referencing Fields in Sub-Reports
> >
> >
> > How can I reference values in textboxes that are located in
> > sub-reports? I have a report (rptMain) with 2 subreports
> > (rptSub1 and rptSub2).  Each subreport only contains 1 textbox.  I
> > want to grab the values from each textbox in the
> > 2 subreports, and display a total of the values on my main report,
> > rptMain. I can't figure out how to enter the Control Source of the
> > textbox on my main report.  With forms, I would just use
> > "Forms!frmMain.frmSub1.Form.txtTextbox +
> > Forms!frmMain.frmSub2.Form.txtTextbox", or something of this
nature.
> > I can't figure out how to do this with reports.
> >
> > Any ideas?
> >
> > Thanks,
> > Mark Boyd
> > I/S Supervisor
> > McBee Associates, Inc.
> > 610/964-9680 x15
> >
> > -----------------------------------------
> > This message and any attachments are intended only for the use of the
> > individual or entity to which it is addressed and may contain
> > information that is privileged, confidential, and exempt from
> > disclosure under applicable law. If the reader of this message is not
> > the intended recipient, or the employee or agent responsible for
> > delivering the message to the intended recipient, you are hereby
> > notified that any dissemination, distribution or copying of this
> > communication is strictly prohibited. If you have received this
> > communication in error, please notify the sender by replying to this
> > message, and then delete it from your system.
> > -------------------------------------------
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> -----------------------------------------
> This message and any attachments are intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential, and exempt from disclosure under
applicable law. If the reader of this message is not the intended recipient,
or the employee or agent responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender by
replying to this message, and then delete it from your system.
> -------------------------------------------
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
>
>

________________________________________________
Message sent using UebiMiau 2.7.2




More information about the AccessD mailing list