Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 13th, 2004, 11:28 AM
Friend of Wrox
Join Date: Aug 2003
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
Default Report Producing NULL values


I am developing a database application using MS Access 2000 for a local charity. Having not used Access 2000 for quite a while my skill set is a little rusty, so I am hoping somebody will take pity on me with the following technical enquiry.

I have produced several reports that produced output based on several parameter queries. My problem is if a user inputs data that cannot be found a blank report is produced and some data values are stated as NULL values. How can I stop a report being produced when no related records can be found?

Old February 13th, 2004, 11:34 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

There are a number of ways, one is too use the onNoData event (I think it's called that, I don't have Access on this machine, it might be something similar) in the report to give a message to the user and cancel the report.


Old February 13th, 2004, 11:39 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts

Private Sub Report_NoData(Cancel As Integer)
 MsgBox "No data found for this report.", , "Report Cancelling..."
 Cancel = True
End Sub

Beth M

Similar Threads
Thread Thread Starter Forum Replies Last Post
Null values jmcgranahan BOOK: Access 2003 VBA Programmer's Reference 0 August 29th, 2006 02:25 PM
Outputing Null values. Neal XSLT 2 July 25th, 2006 05:46 AM
Passing null values maddy137 ASP.NET 1.0 and 1.1 Basics 1 May 7th, 2006 12:26 PM
CheckBoxList and Null Values steve35719 ASP.NET 2.0 Basics 1 April 21st, 2006 09:42 AM
Checking for Null Values asmodeus BOOK: Beginning VB.NET Databases 2 June 3rd, 2005 03:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.