Run time error 2501 - please help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Here's the situation. I recently upgraded my users to Office 2003 from
Office XP (2002). Several of the machines were new and therefore never had
Office XP installed on them. On these machines, the users are receiving a run
time error 2501 whenever they try to open certain forms within the database.

I am not a programmer, so I don't know what the code is supposed to be
doing. I am the network admin and it's fallen to me to try to determine the
solution.

Here's what information I can provide at this time. Please ask about
anything else that may help indentify the problem.

Error message is:

Run-time error 2501
The OpenForm action was canceled.

When I hit the Debug button in the error, it shows the following code:

Private Sub btnFormStats_Click()
DoCmd.OpenForm "FormStats"
DoCmd.Close acForm, Me.Name
End Sub

Any help with this problem would be greatly appreciated.

Dave
 
Dave

That looks like just standard stuff. Does FormStats have any code event or
macro in its open or load event that might be cancelling the OpenForm
command?
 
A possible case is that the Form "FormStats" has some checking code the
Form_Open Event and cancelled the opening of this Form. In this case, you
get the error 2501 returned by the code you posted.

However, in this case, existing users should also receive the same message
as the code you posted doesn't have error-trapping to ignore error 2501. It
is possible that the checking is for existence of data from the Back-End
file (assuming that you have Front End / Back End set-up) and some different
set-up or file permissions prevent users on new machines accessing the data
(hence the error) while the old machines can access the data and hence the
opening of the Form goes through without errors.
 
Thanks, both of you, for the responses!

I'll pass these questions to the person who works with the database and see
if it helps her determine the cause.

Dave
 
This problem continues and I am really at a loss.

The situation:

Two users are unable to open a form in a database using Office 2003. These
same users can open the form in Office XP. The common variable is that both
of these user's machine never had Office XP installed on them before the
upgrade to Office 2003. On computers that had Office XP installed prior to
the upgrade, I can log in as the user and open the form without any problems.

It seems reasonable then that it's something tied to the fact that it was a
'clean' install of Office 2003.

You can see the error and the code in the first post. Any advice is most
welcome as I am at a dead end.

Thanks!
 
Dave

There is no error in the code you posted. That is standard stuff and should
work in any version of Access.

One thing I question...Why keep Office XP on the same machine as Office
2003? They both use the same Access file format. I can see no real reason to
have both installed.

Is Access 2003 fully updated? This could be the result of a bug that needs
patching.
 
Can you trace the code to find out the line of code (and the preceding code)
that error out?

Without it. I think we can only guess ...

Try setting the Macro Security to Low on the Access 2003 installs...

If you are using NAV, disable the Office Plugin and see if the problem goes
away ...
 
Thanks for the replies guys! Sorry I didn't respond sooner but have been
wrapped up.

The problem is resolved and of all things, it turned out to be the printer
these users were trying to print to. I don't know what the code (Access) was
trying to do but once I set up a different printer, everything worked fine.

MS support actually gave me the answer for this one. I appreciate all the
help here though and just wanted to let you know what the resolution was.

Dave
 
Hello to all. I have the same problem. I had a user using windows 2000 with
office 2003 fully updated, and I change is machine with a new one running
Windows XP and 2003 fully updated. Everytime I try to print or preview a
report itreturns me the Ru-Time error 2501. I changed the default print to
windows default and it worked fine.

In windows 2000 I had no problem, how can i solve my problem? Must the user
change the default printer everytime he wants to use the problem.

Any solution?


Regards,
Marco
 
Yep. To print or preview a Report in Access 2003, the user needs to have a
default printer set up. If there is no default printer, Access will cancel
the opening of the Report and the code that calls for the print / preview of
the Report will error out with error 2501.
 
Hi. Well, here I had already had a degfault print, in windows XP we have
aldays at least a default print. Waht I did was something stupid. I just
change a thing on the printer and then I apply and it worked, but it was
nothing special.

By the way, thanks for your reply.

Marco
 
Back
Top