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

resolvedResolved · Low Priority · Version 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:

How To Find All Overdue Accounts?

To find overdue accounts create a filter that compares today's date with the Invoice Date in the table. To do this:

1. Open the Query in Design View
2. Select the field for the filter and in the criteria row enter:

<Date()

This filter returns records where the Invoice Date is before today's date.

This filter can be manipulated if, for instance, Invoices are due 15 days after the Invoice Date. For this the filter would be:

<Date()-15

This filter returns records where the Invoice Date is 15 days before today's date.

View all Access hints and tips


Server loaded in 0.06 secs.