Solved

DoCmd.RunCommand acCmdSaveAs Works in MDB but not in MDE

Posted on 2012-03-27
6
1,053 Views
Last Modified: 2012-03-27
Would like to export a report into a textfile, doesn't work in MDEs
0
Comment
Question by:themrocc
  • 3
  • 2
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 37770644
Are you saying this happens on the same pc - works for an mdb but doesn't work for an mde on the same machine?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 37770679
I would add that I always thought that accmdsaveas just allowed you to save an object within your database (which would explain why it doesn't work in an mde).  I didn't know you could use it to export a report.  

Just trying it here with a report I don't get any option to save as a text file.

SO I'd be interested in seeing the surrounding code that produces the text file from your mdb.
0
 

Author Comment

by:themrocc
ID: 37770828
It works perfectly in an MDB; the code ist just as stated above:
DoCmd.RunCommand AccCmdSaveAs
The MDB produces a dialog box where you can choose the filetype , destination path and filename.
The MDE comes up with an error: Can't open <procedurname>
BTW: the built-in symbol "Save as/Export..." will be grayed in the MDE, so I tried to make the code myself...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 77

Expert Comment

by:peter57r
ID: 37770872
Which version of Access are you using?

I can't get such a dialog box in either A2003 nor in A2010.
The dialog I get in A2003 only offers the option of saving a report as a report or a Data Access Page and in A2010 the DAP option has gone so all I get is an option to save as another report.
Capture3.JPG
0
 

Author Comment

by:themrocc
ID: 37770963
It's A97
Snap3.JPG
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 37771006
Use the output to method rather then saveas.

Jim.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question