[AccessD] How to evaluate if report was cancelled due to no data

Wortz, Charles CWortz at tea.state.tx.us
Thu Aug 14 10:42:47 CDT 2003


Susan,

You can set a flag in the NoData event that you then test in the calling
module.  Remember, the flag will have to be defined as Public in a
standard module so it will be within the scope of both objects.

Charles Wortz
Software Development Division
Texas Education Agency
1701 N. Congress Ave
Austin, TX 78701-1494
512-463-9493
CWortz at tea.state.tx.us



-----Original Message-----
From: Susan Geller [mailto:sgeller at cce.umn.edu] 
Sent: Thursday 2003 Aug 14 10:35
To: accessd at databaseadvisors.com
Subject: [AccessD] How to evaluate if report was cancelled due to no
data

XP.  I have a form that opens a report.  In the report, I have:

Private Sub Report_NoData(Cancel As Integer)
MsgBox "There are no data to display for the criteria you selected.",
vbOKOnly, "DataMart" Cancel = True End Sub

All's well. 

PROBLEM:  The report cancels, and it goes back to the line right after
the open report line of code.  At that point, I want to evaluate to see
if the report was cancelled so that I can do one thing if it was
cancelled due to no data and do something else if it wasn't.  How can I
do this?

--Susan


Susan B. Geller
Office of Information Systems
College of Continuing Education
University of Minnesota
306 Wesbrook Hall
77 Pleasant Street SE
Minneapolis, MN 55455
Phone:  612-626-4785
Fax:  612-625-2568


More information about the AccessD mailing list