Solved

DoCmd.RunCommand acCmdSaveAs Works in MDB but not in MDE

Posted on 2012-03-27
6
1,030 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

758 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

21 Experts available now in Live!

Get 1:1 Help Now