Error opening report

D

David

Using Access 2003, SP3. I have this code when a button is clicked:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

When this line tries to execute, I get the error "You canceled the
previous operation".

I've tried compacting/repairing to no avail. Also, this access
database runs on 25 other computers and has no problems with this line
of code. Something on this one computer is causing this and I don't
know what it is. Interestingly enough, I can't even open the report
in design view on this computer. Nothing happens when I try to open
in design view.

Any suggestions?

Thanks,

David
 
A

Allen Browne

Replace the line of code with:
If Me.Dirty Then RunCommand acCmdSaveRecord
Then choose Compile on the Debug menu (in the code window.)

Does this problem computer have any printer installed? Access uses the
metrics of the printer driver to calculate the layout of the report. If
there is no printer installed, or if the default/assigned printer has a
faulty driver, it can prevent you opening the report as you indicated. With
Access 2003 particularly, this problem can also be triggered by a network
printer that has some issues (even if Word and other programs can print it
it.) Perhaps you could temporarily install a completely different local
printer to test if that works. (You don't have to buy another printer.)

If you have not yet installed the hotfix for Office 2003 SP3 on this
computer, it might be worthwhile:
http://allenbrowne.com/bug-Access2003SP3.html
I'm not aware of it addressing this issue, but it needs it anyway.

The problem could also be due to faulty library references on the computer:
http://allenbrowne.com/ser-38.html

There could be other causes, such as:
- limited user permissions
- the actual data in the record that could not be saved (e.g. required field
missing.)
- corruption of the database:
http://allenbrowne.com/recover.html

Not sure if you have lots of users in the one MDB at the same time. If so,
consider splitting.
 
D

Duane Hookom

I don't see what you code has to do with a report. However, it sounds like
you can't open a report is any view. I expect you can't create reports. If
this is the case, make sure you have a default printer set in the Windows
Control Panel. Maybe try change your printer if this doesn't work.
 
D

David

Allen,

Thanks for the suggestions. It's funny you ask about the printer.
This particular user used to use a Dell AIO 946 printer. He'd have
this same problem until I figured out that the printer was causing the
problem. He no longer uses that printer and I did try switching
default printers to no avail. The way this mdb works is that the user
has a local copy of the database and gets a new version from the
server if a newer version is available. I fixed the problem by
copying the version from the server to the client. I'm not sure if
this user accidentally hit a wrong key or button that could have
caused this problem, but it's fixed for now. Funny thing, it's always
the same user that has these problems.

Thanks again.

David
 
A

Allen Browne

Good news. Sounds like some kind of corruption.

It could be to do with the user, or - if he uses the same machine - it may
be something faulty in the network connection or in the hardware of that
machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top