Change decimal places based on column in recordset (not on report)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that uses a column in the report's recordset to determine
report grouping and footers. This works fine, but I also want to control the
number of decimal places the report displays in each section based on the
current value of the column in the recordset that controls grouping.

I want to check this value in the OnFormat event of the relevant report
sections, but the value is not bound to any contrls on the report, (and I
would prefer not to put invisible controls on the report), and I get an error
when I try to refer to the recordsource of the report. Specifically,
attempting to use code like "Me.Recordset!Fieldname" results in the error
that 'This feature is not available in an MDB'

Is it not possible to refer to values of the underlying recordsource while a
report is running? I believe that this approach works in a form, but is a
different approach needed in a report? Is it necessary to bind all referenced
values to controls on the report?

Thanks to all for any comments or suggestions.

TK
 
TK,

There is no problem with referring in code to fields in the report's
record source.

It may turn out to be simpler to use a calculated field in the query the
report is based on, to construct the figures with the requisite number
of decimal places, rather than trying to use the Format event of the
report section.
 
Back
Top