473,513 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I run a saved Export in VBA ?

27 New Member
I have several saved exports (querries to text files) and I would like to have a button to execute them in vba and write out all of my data files. Anyone know the syntax for that?
Sep 17 '10 #1
5 16203
Mariostg
332 Contributor
If you are trting to run a saved query through VBA, how about DoCmd.OpenQuery? Put this inside your action button OnClick.
Sep 17 '10 #2
simulationguy
27 New Member
its not a saved querry its a saved export. So after I ran the querry I went to the export data menu and set up the way I wanted to export it to a text file directory file name etc and saved that.

I can go to the export data menu and select the saved export from the list and hit the run button and it recreates it just what I want, but I want to execute that in code.
Sep 17 '10 #3
gershwyn
122 New Member
You didn't say which version of Access you're using.... but if it's 2007 you can use the DoCmd.RunSavedImportExport method.
Sep 17 '10 #4
simulationguy
27 New Member
Thanks! I am using Access 2007 and that was exactly what I was looking for and it worked.
Sep 18 '10 #5
simulationguy
27 New Member
Crap! Not quite there, the code runs the saved export okay the problem is that the saved export also contains the path name which will not be the same when I give the database to the end user.

and the textexpport method doesn't write the file out correctly and if I use the specification there is a bug in 2007 (from what I found) that makes it so it can't find the specification even when its been created correctly.
Sep 20 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

205
10458
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
16
11816
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation....
2
4348
by: Ted Theodoropoulos | last post by:
i feel like this should be straight forward but for some reason it doesn't appear to be. i have a subform in an adp file that contains a large number of records (>65K) and the recordsource is...
8
13201
by: Taffman | last post by:
I've searched this goup for an answer to this, there are many discussions that come close but non that I can find that actually addresses this particular problem. I'm exporting queries to Excel....
2
1913
by: safak112 | last post by:
Hi everybody; I am exporting a table to a new txt file by using MS access 2000. But as you know we can save our export specs, and next time we can call it and can use it once more. But in my...
6
4321
by: Vic4338 | last post by:
I have a database with 50000 records containing phone numbers, I need to export the phone numbers sorted by area code, and create/save to .txt using the area code as the phone number. I create...
1
9119
by: Justin | last post by:
When running an export: export to css.ixf of ixf select css_id, service, client_id, site_id, css_label, css_abbr, sos_flag, city, state, 'N', 'N' from userid.css_defn It returns an...
21
7283
by: Cele Balser | last post by:
Can someone tell me the VBA code to use in my module to select the External Data ribbon? I have a module that runs through some queries and at the end of them I want to export the query to Excel. I...
8
18737
by: iheartvba | last post by:
Hi I am using Access 2007 and am trying to export a query to a fixed length text file. I tried using the following code to export the text file: DoCmd.TransferText acExportFixed, , "qryFFRDeFile",...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.