Export macro woes (1 Viewer)

ethan.geerdes

Registered User
Joined
Jun 4, 2015
Messages
116
I almost have my project complete but I need to export a table. I was able to do it the way it needed to be through the export wizard so I think there is a way to specify this in code so that I can tie this to a button but need some help. In the wizard, I select the export to text feature. Select my destination, leave the "export data with formatting and layout" unchecked, choose a delimited export, I use the | as the field delimiter and the text qualifier as a ^.



In the macros I found the ImportExport to Text but I couldn't figure out how to work that to get what I needed.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,295
Hi Ethan. When you used the Wizard, did you tell Access to save the Export steps when it asked you at the end? Just curious...
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,295
no I didn't.
Okay. Just curious; because if you did, you can simply try to rerun it using a macro. However, there are other ways of exporting a table using a macro like the ExportWithFormatting action. If you had saved the steps from the wizard, you could also use the RunSavedImportExport action. And if you decide to use VBA, there's even more choices for you to export the table.
 

ethan.geerdes

Registered User
Joined
Jun 4, 2015
Messages
116
Thank you. I found it. My brain read that with spaces so it missed it in the first look. one more question, is there a way to have a variable in the form be in the file name of the document? I'm thinking like a date range.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,295
Thank you. I found it. My brain read that with spaces so it missed it in the first look. one more question, is there a way to have a variable in the form be in the file name of the document? I'm thinking like a date range.
Now, you're getting into the limitations with macros. This won't be possible with just a macro using the saved export task. But if you use VBA, then you can do almost anything.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top