Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

nulls and reports

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Nulls and Reports - Access 2000

Nulls and Reports - Access 2000

ResolvedVersion Standard

James has attended:
Access VBA course
Access Advanced course

Nulls and Reports - Access 2000

I have created a report based on a Crosstab query that details spendings with a supplier for each quarter of the past x years.

In the query, Year is the Row Heading, and the Quarters are the Column Headings. The Value is calculated by the expression: Sum(nz([ActualCost]),0))

The report has two group levels - SupplierName and Year - the headers for which contain the identifying field, and the footers contain controls summing over the relevant group. The detail section contains the controls for each quarter.

My problem is this: if there is no data for a particular quarter, the field in both the query and report appears blank - a null. If I add another nz() function on the value expression, the query result is populated with zeros in place of the nulls, but then when I try to preview the report I get the error message "Data type mismatch in criteria expression". Alternatively, putting a nz() function on the report's fields stops the summation controls from working, as you can't perform a calculation on a calculated field.

Can anyone tell me what I might have overlooked?

Ta

James

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Dsum

You can create percentage values based on individual products / items by using a Dsum function (used with a grouped query)

[Each value column] / Dsum[field:total for the column needed to be calculated],[tablename]

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.