Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error 2501- The close action was canceled

685 views
Skip to first unread message

John von Colditz

unread,
May 16, 2001, 9:25:01 PM5/16/01
to
Intermittently, on of my customers has been getting the above error when
using one of the forms in an Access 2000 db. To close the form, you must go
to the Task Manager and close Access. On restarting, the user will
invariably get the error when closing the form. Compact and repair does not
make it go away. Replacing the form returns everything to normal.

Any suggestions?

John von Colditz


Don P. Mellon

unread,
May 17, 2001, 12:58:46 PM5/17/01
to
1. In Access 2000, Error 2501 is associated with the SendObject function.
Are you sure about the message you are getting?

2. "Replacing the form returns everything to normal"? What do you mean by
this? Are you saying that an imported backup copy of the form solves the
problem, and that the problem does not return?

3. Have you tried setting your Error Trapping option to Break on All Errors
to see if a line of code is doing this?

Sorry for all the questions. I know you expected answers.

--
Don P. Mellon
Take the pig out of my wigwam, please.

= = = = =

"John von Colditz" <joh...@teleport.com> wrote in message
news:NLFM6.9918$Az.9...@newsread2.prod.itd.earthlink.net...

Pedro Gil

unread,
May 18, 2001, 6:14:38 AM5/18/01
to
Error 2501 is not related to the SendObject period.

On Thu, 17 May 2001 10:58:46 -0600, "Don P. Mellon"
<pig...@3rivers.net> wrote:

>1. In Access 2000, Error 2501 is associated with the SendObject function.
>Are you sure about the message you are getting?

[snip]
---------
Pedro Gil
http://www.geocities.com/pmpg98_pt

DDPI
http://www.users.bigpond.com/papwalker/DDPI.HTML
https://sourceforge.net/projects/ddpi/

Don P. Mellon

unread,
May 18, 2001, 9:53:14 AM5/18/01
to
Go tell it to Microsoft:

"You receive the following error message:
Run-time error '2501':
The SendObject action was canceled."

(Quoted from MS KB Article Q260819)


--
Don P. Mellon
Take the pig out of my wigwam, please.

= = = = =

"Pedro Gil" <pmpg_NO...@Hotmail.com> wrote in message
news:3b04f5e5...@news.cis.DFN.DE...

Don P. Mellon

unread,
May 18, 2001, 10:53:33 AM5/18/01
to

Oh, I get it. You must be using that OLD version of Access, you know, the
one that is just so PERFECT and so ERROR FREE and so much better than Access
2000.

***
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.

When you try to open a form in Filter-by-Form view programmatically in a
Microsoft Access 97 run-time application, you may receive the following
error message

Run-time error '2501': The RunCommand action was canceled.
followed by:
Execution of this application has stopped due to a run-time error. The
application can't continue and will be shut down.

CAUSE
The Filter-by-Form commands are unavailable in a Microsoft Access 97
run-time application.

RESOLUTION
For more information about simulating Filter-by-Form in a run-time
application, please see the following article in the Microsoft Knowledge
Base:

Q166634 ACC97: Filter-by-Form Example for Run-Time Apps Available in
Download Center


***
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.

When you use the OutputTo method in Visual Basic for Applications to output
a form or report module to a text file, you may receive the following error
message:

Microsoft Access
Run-time error '2501'

The OutputTo action was canceled.

You used a method of the DoCmd object to carry out an action in Visual
Basic, but then clicked Cancel in a dialog box. For example, you used the
Close method to close a changed form, then clicked Cancel in the dialog box
that asks if you want to save the changes you made to the form.

CAUSE
You cannot use the OutputTo method in Visual Basic for Applications to
output form or report modules. Form or report modules are class modules that
contain code that is local to the form or report. They do not appear in the
Database window as standard modules do. You can output only modules that
appear in the Database window with the OutputTo method.

RESOLUTION
When you use the OutputTo method, only output standard modules and class
modules that are not associated with any form or report.

NOTE: A workaround for this is to copy all the code from the form or report
module and paste it into a word processing document; then you can save the
word processing document as a text file.

***
SYMPTOMS
When you export objects with the "Publish to the Web" Wizard, if you cancel
or close any dialog boxes or forms that appear, you may receive the
following error message:

The OutputTo action was canceled.

After you click OK on this message, the "Publish to the Web" Wizard quits,
and no more objects are exported.

CAUSE
The "Publish to the Web" Wizard does not contain error handling procedures
that allow it to continue after you receive run-time error 2501, the error
that occurs when the OutputTo action is interrupted.

RESOLUTION
Do not cancel or close any prompts that appear while you are using the
"Publish to the Web" Wizard. For example, if an "Enter Parameter Value"
dialog box appears, or if a form opens to input criteria for a report,
provide the requested values, and then click OK or Continue.

STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.

***

--
Don P. Mellon
Take the pig out of my wigwam, please.

= = = = =

"Pedro Gil" <pmpg_NO...@Hotmail.com> wrote in message
news:3b04f5e5...@news.cis.DFN.DE...

Pedro Gil

unread,
May 18, 2001, 11:00:32 AM5/18/01
to
Yep, I saw that...

But I hope that you known that reading KB articles, is not enough for
the understanding of a product, this may explain why I find A2K such a
great app.

Well you must also take a look at:

"run-time error 2501, the error that occurs when the OutputTo action
is interrupted"

[quoted from MS KB Article ID: Q167851]

Well I'm here thinking if I should explain this to you or not, but for
the sake of someone poking around.

The run-time error 2501, is raised anytime you cancel a DoCmd Action.

The | action was canceled.@You used a method of the DoCmd object to


carry out an action in Visual Basic, but then clicked Cancel in a
dialog box.

So stating that this error is

"Error 2501 is associated with the SendObject"

[quoted from Don Mellon]

is plain wrong

If someone want to test it just issue a Docmd.OpenReport and in the
Open event of the report cancel it, to check it out.

On Fri, 18 May 2001 07:53:14 -0600, "Don P. Mellon"

Pedro Gil

unread,
May 18, 2001, 12:40:30 PM5/18/01
to
Hummm...

Now I understand why you praise A2K, you are just using some
independent version of A2K, never realease to the common people like
us, well in fact you are plain wrong on that, I do use A2K, just don't
like it that's all.

Maybe you should try this code in your version of A2K, I'm sure it
will not give you the error 2501.

Sub OpenReportCancel()
On Error GoTo err_trap

DoCmd.OpenReport "Report1"

err_trap:
Select Case Err.Number
Case 2501
MsgBox "Good it's only in my machine" & Err.Number &
Err.Description
Case Else
MsgBox "Err diff from 2501"
End Select
End Sub


Private Sub Report_Open(Cancel As Integer)
Cancel = True
End Sub

[Snip]

Don P. Mellon

unread,
May 18, 2001, 1:19:10 PM5/18/01
to
"Now I understand why you praise A2K, you are just using some
independent version of A2K, never realease to the common people like
us...."

I am sure you are right. All I have ever used are NFR copies of Microsoft
products (Not For Resale, or, as my reseller always tells me, "Not For
Rednecks"). Microsoft must be issuing "good" copies of Access 2000 to the
people responsible for large purchases, but then sending "bad" copies when
the actual order is placed. This would explain why I cannot understand what
the problem is with Access 2000.

On the other hand, sometimes I get the feeling there is an "attitude" around
here, an anti-Access 2000 bias that has little or no basis in reality. If
you do not display this attitude, then The High Priests of The Ancient
Access Order will condemn you as a heretic and incite The Faithful to burn
you at the stake.

--
Don P. Mellon
Take the pig out of my wigwam, please.

= = = = =

"Pedro Gil" <pmpg_NO...@Hotmail.com> wrote in message

news:3b054fa4...@news.cis.DFN.DE...

Pedro Gil

unread,
May 18, 2001, 1:50:30 PM5/18/01
to
Well escaping out on the problem, are we!!

Just a small comment on the other hand... It's not true, and the fact
that so many people do tell not so good things about A2K, should be a
thing to think about, not to deep your head on the sand. I do think
that A2K, do have some promissing stuff, just not completed stuff, I
for once find really bad the changes on the IDE and help file, but I'm
really not a qualified person to talk about this, since I do not use
it very oftent, that's why I never talk not good nor bad about A2K.
But if you want that I say something good about it, I do find that
ADP, it's a good thing that they added, with a few stuff that needs to
be improved, but a good feature IMHO, and taking in consideration that
I didn't make too much stuff. The Unicode Suport is also a good thing,
Replication did get better, at least from what I've read. Well I think
that I'm getting in your game.

THE QUESTION SHOULD BE: What the heck can you do in A2K that you can't
do in A97?

On Fri, 18 May 2001 11:19:10 -0600, "Don P. Mellon"
<pig...@3rivers.net> wrote:

>"Now I understand why you praise A2K, you are just using some
>independent version of A2K, never realease to the common people like
>us...."
>
>I am sure you are right. All I have ever used are NFR copies of Microsoft
>products (Not For Resale, or, as my reseller always tells me, "Not For
>Rednecks"). Microsoft must be issuing "good" copies of Access 2000 to the
>people responsible for large purchases, but then sending "bad" copies when
>the actual order is placed. This would explain why I cannot understand what
>the problem is with Access 2000.
>
>On the other hand, sometimes I get the feeling there is an "attitude" around
>here, an anti-Access 2000 bias that has little or no basis in reality. If
>you do not display this attitude, then The High Priests of The Ancient
>Access Order will condemn you as a heretic and incite The Faithful to burn
>you at the stake.
>
>--
>Don P. Mellon
>Take the pig out of my wigwam, please.
>
>= = = = =

---------

Don P. Mellon

unread,
May 18, 2001, 3:30:46 PM5/18/01
to
You know me. I never escape anything. I take more hits than anybody.

I do not give much weight to the bad things others say about Access 2000
because my experience with Access 2000, over the last two years, has been
generally positive. I say "generally" because there are a few minor things
that annoy me, but none of them rise to the level of the complaints we have
seen here. (Note, also, that most of the complaints have to do with
development, not with end users being dissatisfied.) I have seen nothing in
Access 2000 that would warrant an outright rejection of it.

I think your "small comment" answered your own question at the bottom of
your reply. I could throw in a few more items that would tip the scales a
little more toward Access 2000, sub-datasheets, Name AutoCorrect,
conditional formatting, reverse versioning, etc., but they are mostly
conveniences.

The most important thing to keep in mind is that Access 2000 is pointing the
way toward new database technologies, what you call "promising stuff." The
fact that some of this new stuff has not been fully thought out or has not
been perfectly implemented is irrelevant because every new technology can be
criticized on that account. Every work of art is a work in progress.

--
Don P. Mellon
Take the pig out of my wigwam, please.

= = = = =

"Pedro Gil" <pmpg_NO...@Hotmail.com> wrote in message
news:3b055e04...@news.cis.DFN.DE...

John von Colditz

unread,
May 23, 2001, 9:11:08 PM5/23/01
to
Sorry to be so late getting back on this. I've been away for awhile.

1) There is no SendObject code associated with the form/subforms.

2) Importing a new copy of the main form eliminates the message. It is free
to corrupt later on, however.

3) I'll give this a try. Problem is I can't reproduce it on any of my
machines.

john


"Don P. Mellon" <pig...@3rivers.net> wrote in message
news:9e0vsq$e4f7$1...@ID-89436.news.dfncis.de...

0 new messages