Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Two messages at no data in a report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leif Thorsen - 17 Jan 2008 10:17 GMT
I have a form with a Click-Buttom for opening a report.
In the design mode of the report I have used "At no data" and there included
a Messega Box saying "Sorry-there is no data in this report".

When having no data i the report and clicking on my buttom in the form I
will hav 2 messages.

The first one is from my message box "Sorry ...."

The second one is from the error handling for the buttom saying "Instructio
Open report cancelled" (Translated from Swedish "Instruktionen PoenReport
avbröts).

A part of the error code for the buttom is
Err_Kommandoknapp6_Click:
   MsgBox Err.Description
   Resume Exit_Kommandoknapp6_Click

I have noted that by deleting the row "MsgBox Err.Description" in the error
code above I only get one error message i.e. the one I myself have invented
"Sorry ...." which is the only message I want to have.

Do I do the wright thing or is there a better way of doing it ???

Thank You in advance for an answer
Brendan Reynolds - 17 Jan 2008 11:22 GMT
>I have a form with a Click-Buttom for opening a report.
> In the design mode of the report I have used "At no data" and there
[quoted text clipped - 25 lines]
>
> Thank You in advance for an answer

To ignore specific errors or take different actions for specific errors,
check the error number. Here's an example ...

ErrorHandler:
   If Err.Number <> 2501 Then  '2501 = action was cancelled
       MsgBox "Error " & Err.Number & ": " & Err.Description
   End If
   Resume ExitProcedure

Signature

Brendan Reynolds

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.