473,659 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stop "The open report was cancelled"

I am opening a report (in Preview) from a menu system

I use the following code if there is no data in a report

Private Sub Report_NoData(C ancel As Integer)

MsgBox "There are no errors in Membership Head of Families",
vbInformation
Cancel = True

End Sub

After this message comes up and is cleared with the OK Button. Access
generates a second annoying message that
"The OpenReport Action was canceled" ( Note Microsoft can't spell
'cancelled' certainly in A2K, but perhaps that is American)

Anyway how do I stop this second message appearing.

Thanks

Phil
Oct 28 '08 #1
4 9656
ARC
Well, in code you would check for the err=2501 in your error routine and
simply exit:

Private Sub Report_NoData(C ancel As Integer)
on error goto ErrRtn
MsgBox "There are no errors in Membership Head of Families",
vbInformation
Cancel = True

Exit Sub
'
ErrRtn:
If Err = 2501 Then 'Open report was cancelled
Exit Function
else
msgbox err.number & " - " & err.description
end if
end sub
"Phil Stanton" <ph**@myfamilyn ame.co.ukwrote in message
news:j8******** *************** *******@posted. plusnet...
>I am opening a report (in Preview) from a menu system

I use the following code if there is no data in a report

Private Sub Report_NoData(C ancel As Integer)

MsgBox "There are no errors in Membership Head of Families",
vbInformation
Cancel = True

End Sub

After this message comes up and is cleared with the OK Button. Access
generates a second annoying message that
"The OpenReport Action was canceled" ( Note Microsoft can't spell
'cancelled' certainly in A2K, but perhaps that is American)

Anyway how do I stop this second message appearing.

Thanks

Phil
Oct 28 '08 #2
ARC
Correction to my last:

The error trapping for 2501 really needs to be on the button that launches
the report. The report will cancel fine, but you get the "open report was
cancelled" in the calling function / button.

Hope this helps,

"ARC" <PC*****@PCESof t.invalidwrote in message
news:Wi******** *******@nlpi070 .nbdc.sbc.com.. .
Well, in code you would check for the err=2501 in your error routine and
simply exit:

Private Sub Report_NoData(C ancel As Integer)
on error goto ErrRtn
MsgBox "There are no errors in Membership Head of Families",
vbInformation
Cancel = True

Exit Sub
'
ErrRtn:
If Err = 2501 Then 'Open report was cancelled
Exit Function
else
msgbox err.number & " - " & err.description
end if
end sub
"Phil Stanton" <ph**@myfamilyn ame.co.ukwrote in message
news:j8******** *************** *******@posted. plusnet...
>>I am opening a report (in Preview) from a menu system

I use the following code if there is no data in a report

Private Sub Report_NoData(C ancel As Integer)

MsgBox "There are no errors in Membership Head of Families",
vbInformatio n
Cancel = True

End Sub

After this message comes up and is cleared with the OK Button. Access
generates a second annoying message that
"The OpenReport Action was canceled" ( Note Microsoft can't spell
'cancelled' certainly in A2K, but perhaps that is American)

Anyway how do I stop this second message appearing.

Thanks

Phil
Oct 28 '08 #3
Thanks "ARC"

Like a clot I checked for error 2501 and insted of exiting. I displayed the
error

Must be going senile

Thanks again

Phil

"ARC" <PC*****@PCESof t.invalidwrote in message
news:8e******** ********@nlpi07 0.nbdc.sbc.com. ..
Correction to my last:

The error trapping for 2501 really needs to be on the button that launches
the report. The report will cancel fine, but you get the "open report was
cancelled" in the calling function / button.

Hope this helps,

"ARC" <PC*****@PCESof t.invalidwrote in message
news:Wi******** *******@nlpi070 .nbdc.sbc.com.. .
>Well, in code you would check for the err=2501 in your error routine and
simply exit:

Private Sub Report_NoData(C ancel As Integer)
on error goto ErrRtn
MsgBox "There are no errors in Membership Head of Families",
vbInformatio n
Cancel = True

Exit Sub
'
ErrRtn:
If Err = 2501 Then 'Open report was cancelled
Exit Function
else
msgbox err.number & " - " & err.description
end if
end sub
"Phil Stanton" <ph**@myfamilyn ame.co.ukwrote in message
news:j8******* *************** ********@posted .plusnet...
>>>I am opening a report (in Preview) from a menu system

I use the following code if there is no data in a report

Private Sub Report_NoData(C ancel As Integer)

MsgBox "There are no errors in Membership Head of Families",
vbInformati on
Cancel = True

End Sub

After this message comes up and is cleared with the OK Button. Access
generates a second annoying message that
"The OpenReport Action was canceled" ( Note Microsoft can't spell
'cancelled' certainly in A2K, but perhaps that is American)

Anyway how do I stop this second message appearing.

Thanks

Phil

Oct 28 '08 #4
ARC
No problem. Actually I keep wanting to change the "ARC" that shows when I
post, but then people won't know that I posted under a different name (if
that makes sense). Guess it wouldn't matter if I change it?

I hear ya on the simple mistakes. Usually it's the one's staring right out
at ya that you can't see.

Andy
"Phil Stanton" <ph**@myfamilyn ame.co.ukwrote in message
news:98******** *************** *******@posted. plusnet...
Thanks "ARC"

Like a clot I checked for error 2501 and insted of exiting. I displayed
the error

Must be going senile

Thanks again

Phil

"ARC" <PC*****@PCESof t.invalidwrote in message
news:8e******** ********@nlpi07 0.nbdc.sbc.com. ..
>Correction to my last:

The error trapping for 2501 really needs to be on the button that
launches the report. The report will cancel fine, but you get the "open
report was cancelled" in the calling function / button.

Hope this helps,

"ARC" <PC*****@PCESof t.invalidwrote in message
news:Wi******* ********@nlpi07 0.nbdc.sbc.com. ..
>>Well, in code you would check for the err=2501 in your error routine and
simply exit:

Private Sub Report_NoData(C ancel As Integer)
on error goto ErrRtn
MsgBox "There are no errors in Membership Head of Families",
vbInformati on
Cancel = True

Exit Sub
'
ErrRtn:
If Err = 2501 Then 'Open report was cancelled
Exit Function
else
msgbox err.number & " - " & err.description
end if
end sub
"Phil Stanton" <ph**@myfamilyn ame.co.ukwrote in message
news:j8****** *************** *********@poste d.plusnet...
I am opening a report (in Preview) from a menu system

I use the following code if there is no data in a report

Private Sub Report_NoData(C ancel As Integer)

MsgBox "There are no errors in Membership Head of Families",
vbInformatio n
Cancel = True

End Sub

After this message comes up and is cleared with the OK Button. Access
generates a second annoying message that
"The OpenReport Action was canceled" ( Note Microsoft can't spell
'cancelled ' certainly in A2K, but perhaps that is American)

Anyway how do I stop this second message appearing.

Thanks

Phil


Oct 28 '08 #5

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

Similar topics

0
1364
by: trint | last post by:
How can I call a report created from reporting services in my c#.net (visual studio .net 2003) project? Thanks, Trint
6
13588
by: TS | last post by:
Hi, i have a problem validating xml against schema. I used http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx validator and it says it is fine. Can you tell me why this doesn't work? Thanks! Schema: <?xml version="1.0"?> <xs:schema id="ReportInfo" targetNamespace="http://tempuri.org/Reports.xsd"
2
14104
by: John Phelan-Cummings | last post by:
After creating a button on a (parent) form linking to another (child) form, I received the following error when clicking on the command button: "The OpenForm action was canceled" No the child form is not a subform. I should also add that I created code in the properties window stating that the "child" "number" field on the form (that I was navigating to),
5
1860
by: meltedown | last post by:
I run into this problem over and over and over again and its driving me crazy. This has a menu on the floated menu on the left. The part to the left of that menu has a margin-left It look fine in firefox, but when the window is small in IE, the stuff on the right flows down and it looks UGLY. How do I get it to NOT flow in ie.
1
3316
by: Dentharg | last post by:
Hi! How can I rename this tab in Crystal Report Viewer from "Main Report" to something else? Thanks!
0
1613
by: U S Contractors Offering Service A Non-profit | last post by:
Baby steps to the "New" New Orleans Inbox Reply Craig Somerford to Chasing, Donald, me, (bcc:Discovery), (bcc:Beijing) show details 3:55 pm (0 minutes ago) Our Beloved New Orleans needs you James Taylor "CLICK" to see why Inbox Reply Craig Somerford
1
5256
by: McKool | last post by:
Hello Group, I'm writting a Windows Services under C# to get some USB events. Because the ServiceBase class does not supports the SERVICE_CONTROL_DEVICEEVENT handler, I'm using P/Invoke to call the RegisterServiceCtrlHandlerEx funtion, using a callback to manage the needed handler. The invoke looks ok, it works. The problem is when the services stops. My callback function receives the SERVICE_CONTROL_STOP handler but the function don't...
9
6246
by: =?Utf-8?B?QW1tZXI=?= | last post by:
I've read many incomplete opinions about the "Best Practice" for securely accessing SQL but what I really need to find the "Best Practice" that fits my applications needs. Currently (alpha stage) I am Using a .Net DSN-Less SQLConnection method in my client program (vb.net) and sending uid/pwd across the network. The client only calls upon the stored procedures to access the tables in SQL 2005. This is a semi commercial application...
2
1728
by: Tom P. | last post by:
I am writting a extended ListView control and I'd like to stop the default behavior when a user right-clciks on a non-label area and then drags causing a "marching ants" selection box to appear. First, what event is this? And second, how do I stop it? I've trapped the OnItemDrag and OnDragEnter events and it's not them (OnDragEnter doesn't even fire). In OnClick I test for right-click and simply return.
0
8850
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.