K
keithb
Here are the details:
Report Name = rptStatement
SubReport Name = rptStatementDetail
SubReport Control Name = sbrStatementDetail
SubReport recordsource = "qryStatementDetail"
Field in this recordsource to inspect = intSalaryPercent
I want to hide various text boxes on the subreport depending on a value
of a field in the subreport's recordsource with code put in the
SubReport's GroupFooter0_Format Event
e.g.
If 'fieldvalue' is true then
Me.txtSalaryPercent.Visible = True
else
Me.txtSalaryPercent.Visible = False
end if
However I cannot get the correct syntax for 'fieldvalue'?
Whilst I can get the value for the control (Me.txtSalaryPercent.Value)
on the subreport I cannot reference the actual database field value
that is returned in the query (intSalaryPercent)
I have tried
Reports.rptStatement.sbrStatementDetail.Report.intSalaryPercent.Value
which fails
(even though
Reports.rptStatement.sbrStatementDetail.Report.RecordSource correctly
returns "qryStatementDetail")
and many others but none have worked so far
If the property values of the sub report such as recordsource are
available in the event surely it should be simplistic to reference a
field in the recordsource itself??
I have also tried using the pling notation
([Reports]![SubReport]![SubReportCtl].[Report].[Property]) but to no
avail - please help
Report Name = rptStatement
SubReport Name = rptStatementDetail
SubReport Control Name = sbrStatementDetail
SubReport recordsource = "qryStatementDetail"
Field in this recordsource to inspect = intSalaryPercent
I want to hide various text boxes on the subreport depending on a value
of a field in the subreport's recordsource with code put in the
SubReport's GroupFooter0_Format Event
e.g.
If 'fieldvalue' is true then
Me.txtSalaryPercent.Visible = True
else
Me.txtSalaryPercent.Visible = False
end if
However I cannot get the correct syntax for 'fieldvalue'?
Whilst I can get the value for the control (Me.txtSalaryPercent.Value)
on the subreport I cannot reference the actual database field value
that is returned in the query (intSalaryPercent)
I have tried
Reports.rptStatement.sbrStatementDetail.Report.intSalaryPercent.Value
which fails
(even though
Reports.rptStatement.sbrStatementDetail.Report.RecordSource correctly
returns "qryStatementDetail")
and many others but none have worked so far
If the property values of the sub report such as recordsource are
available in the event surely it should be simplistic to reference a
field in the recordsource itself??
I have also tried using the pling notation
([Reports]![SubReport]![SubReportCtl].[Report].[Property]) but to no
avail - please help