query return values

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

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Query return 0 values affecting Report

Query return 0 values affecting Report

resolvedResolved · Urgent Priority · Version 2016

Manny has attended:
Access Intermediate course
Access Advanced course

Query return 0 values affecting Report

Hello,

I have built a report based on an underlying query.
The query has many joins and "many to one" relationships.

The query also has 2 separate queries that are joined using a 1-2-1 relationship. Both of these queries search separate tables to find values. These queries return 0 records (correctly!), but then causes the entire report output to be blank. This query searches for bank transactions. If therefore it cannot find any records, there are no bank transactions (essentially a 0).

How can i control for the 2 separate queries to return 0 value (it would be a 0 value as it can't find any records)?

RE: Query return 0 values affecting Report

Hi Manny,

Thank you for the forum question.

I am not sure I understand what you want to achieve, but if you want a zero in your report if the query has no records, you can add a text box to the report and type:

=IIf(Count(*) Is Null,0,Count(*))

This will tell you how many records there is in the underlying query.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Mon 19 Oct 2020: Automatically marked as resolved.

 

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:

Undo Entries In Records

To Undo any entries or changes in records:

Hit the ESC key once for the current field

And ESC twice for current record

View all Access hints and tips


Server loaded in 0.07 secs.