The basic approach is to divide'n'conquor, i.e. split the problem in half
repeatedly until you pin down the culprit.
Make a backup-copy of the database file, and of this report.
Delete half the calculated controls from the report.
Problem still present?
- Yes: delete half the remaining calculated control
- No: put half the deleted controls back in.
Repeat, halving each time, until you pin down the culprit.
The problem could be in:
- a calculated control on the report (i.e. in the Control Source of a text
box that starts with =.)
- the Sorting And Grouping box
- the source query
- the report's Filter or OrderBy property
- code or macros behind the report's events
- same stuff in any subreport
One of the less obvious factors is that Access may be interpreting the data
type incorrectly. For example, if you ask it to average this expression:
IIf([Field1] Is Null, "N/a", [Field1])
Access will spit the dummy: "n/a" is not a numeric value and so it can't
average it. Explicitly typecasting calculations can help, as explained here:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
Note that Access gives up when it finds one calculated control that it can't
figure out. Therefore other controls that have not been calculated at the
time when things go bad can also show #Error.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
message
news:
[email protected]...