Solved

DoCmd.RunCommand acCmdSaveAs Works in MDB but not in MDE

Posted on 2012-03-27
6
1,037 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now