Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DoCmd.RunCommand acCmdSaveAs Works in MDB but not in MDE

Posted on 2012-03-27
6
Medium Priority
?
1,098 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 58

Accepted Solution

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

Jim.
0

Featured Post

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!

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

721 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