473,327 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Don't display the: "The OpenReport action was canceled" message box.

Hi,
For my 'On No Data' event I have the following code:

Private Sub Report_NoData(Cancel As Integer)
On Error Resume Next

MsgBox "There is no data available for your selections.", vbInformation,
"No Data Available..."
Cancel = True

End Sub
The code works fine but after the msgbox has been acknowledged, I get a
system message box stating "The OpenReport action was caceled". How do I
stop this from being displayed.

Version: AcessXP - database is in A2K format.

Thanks!!
Nov 12 '05 #1
1 6772


LittleCheeseburger wrote:
Hi,
For my 'On No Data' event I have the following code:

Private Sub Report_NoData(Cancel As Integer)
On Error Resume Next

MsgBox "There is no data available for your selections.", vbInformation,
"No Data Available..."
Cancel = True

End Sub

The code works fine but after the msgbox has been acknowledged, I get a
system message box stating "The OpenReport action was caceled". How do I
stop this from being displayed.

Version: AcessXP - database is in A2K format.

Thanks!!


Call your report with an OnError event

Sub CallReport()
On Error Goto Err_CallReport
Docmd.OpenReport "MyReport"

Exit_CallReport:
Exit Sub
Err_CallReport:
If err.number <> 2501 then msgbox err.description
resume Exit_CallReport
EndSub

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris Markle | last post by:
When JavaScript writes out a dialogue box (like when confirm() is called) the header or title of that dialogue box shows up as "JavaScript Application"... Can this title be changed so that maybe...
8
by: RC | last post by:
In my Access 2002 form, I have a combo box and on the AfterUpdate event I use DoCmd.RunSQL ("UPDATE .... to update records in a table. When it starts to run I get a message "You are about to...
4
by: Cris Rock | last post by:
In my ASP.Net application, validation rule demands that user has to select one of the option buton(...WebControls.RadioButton). I am doing these kind of validations in the server side when the user...
1
by: Grey | last post by:
i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different...
1
by: bienwell | last post by:
Hi all, I have a problem in ASP.NET program (Web pdevelopment). In VB Sub function, I want to dipslay a message box. The next line of my code is to response.redirect to the next page. My...
5
by: Gary | last post by:
I am wondering if there is a control available in C# to display a downward triangle, and show the list box with roll up and roll down triangles if the files number is out of range?
2
by: rjames.clarke | last post by:
I want to do a mass emailing for a club. I don't want all the clubs members to see all the addresses of the other club members for privacy reasons. How do I set up the php mail function to not...
2
by: Shaileshsharma | last post by:
Hi, i want to dispay the message box like VB,VB.net in C#.It is possible or not? if yes please tell me How. Regards, Shailesh Kumar
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.