DoCmd.OpenReport closes Access

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

Guest

Hi,
I built a report and it works fine when in design mode, print preview and so
on.
Now, I want to display a preview of the report by clicking on a botton on a
form.
The code I wrote is:
DoCmd.Close
DoCmd.OpenReport "rptAsthmeProVsAgentSens", _
acViewPreview, , , acWindowNormal
But that code does not do anything but close Access altogether. Fortunately,
I save my work regularly.
What coulb be the problem and how can I correct it?
Thank you.
 
Hi, it's me again,
I tried my application in Access 2003 and it works fine. The problem appears
only with Access 2000. My users will only upgrade to the version 2003 next
summer.
Can someone tell me how to circumvent this problem?
Thank you.
 
Have you check the Help | About in the user's copies of Access 2000. That
version benefitted greatly from the Service Packs that were published for
it -- without them, it had a lot of problems.

_Next_ summer? You mean, Summer 2007? Yet another version of Access (to be
called Access 2007, we hear) is planned for release in _2006_. Your
coroporate IT department must be swamped to be that far behind.

Larry Linson
Microsoft Access MVP
 
Hi Larry,
No, i didn't check the Help because on my computer, they installed Office
2003 first. I told them that the users had the version 2000 so they installed
Access 2000 in a different directory. The help file for Access 2000 doesn't
work properly and is a pain to use. I get help from the newsgroups that I
appreciate a lot.
On Monday, I will ask them if there are some SPs available for the version
2000.
With "next summer", I meant "this summer" (2006). It is very late for an
upgrade, I know, but there are 2000 employees in that office and they have
important applications that are not compatible with Office 2003.
Thank you for your reply. I will keep looking for an answer to my problem.
 
Thank you for your reply. I will keep looking
for an answer to my problem.

Try your code (quoted below) without the DoCmd.Close. Try it without
specifying acWindowNormal (which, if I remember correctly, is the default
and, thus, does not have to be specified).

Other than ensuring all the updates are applied to Access 2000, that's all I
can suggest.

Larry Linson
Microsoft Access MVP
 
Hi Larry,

I did as you said and it still does not work. But the problem is the Access
installation, I know now. I tried my application on the user's computer and
it works fine.
We will have to choose between the 2000 version or the 2003. And which ever
version we choose, we will have to reinstall Access or the complete Office
suite on my workstation.
Thanks for your comment.
 
Jac Tremblay said:
Hi Larry,

I did as you said and it still does not work. But the problem is the
Access
installation, I know now. I tried my application on the user's computer
and
it works fine.
We will have to choose between the 2000 version or the 2003. And which
ever
version we choose, we will have to reinstall Access or the complete Office
suite on my workstation.
Thanks for your comment.

My clients have not had any problem running Access 2000 format databases
under Access 2000, even though I generated them with Access 2002 or 2003.
However, I insist that they thoroughly test them, using Access 2000, before
they roll them out to users. Others, whose knowledge and opinions I respect,
suggest /DECOMPILE and then compiling in an Actual Access 2000 environment
(and I don't particularly disagree that would be best, if feasible).

And, one reason that those may work so well is my desire to "keep it simple"
when implementing databases. When you keep the design simple, it is much
easier to spot where something has gone wrong, and fix it.

Larry Linson
Microsoft Access MVP
 

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

Back
Top