Export wizard

N

netalie

Hi,

I'm using the export wizard to export data from access to
a text file, and my export settings are always the same.

is there a way that i can code this action other then use
the wizard every time?

Thanks
 
N

Nikos Yannacopoulos

Netalie,

Start the manual process once more, and while in the export wizard, just
before finish, click on Advanced, Save as to save your export
specification... and write down the spec name.

Then make a new macro with an action TransferText (you'll need the spec name
here). All you need to do next time is run the macro.

HTH,
Nikos
 
N

netalie

firstly, thanks,
i have a problem running it though, it gives me the erro
of a read only object. i'm logged in as admin.
what is the problem?
 
G

Guest

firstly, thanks,
i have a problem running it though, it gives me the erro
of a read only object. i'm logged in as admin.
what is the problem?
 
V

Van T. Dinh

Try deleting the old exported Text file first before exporting again.

Post your VBA code if you still have problems
 
G

Guest

still same error...
here is the code:

Function Macro11()
On Error GoTo Macro11_Err

DoCmd.TransferText acExportDelim, "aaa Export
Specification", "tablename", "c:\output", False, ""


Macro11_Exit:
Exit Function

Macro11_Err:
MsgBox Error$
Resume Macro11_Exit

End Function
 
G

Guest

found the problem,

thanks!!!!
-----Original Message-----
Try deleting the old exported Text file first before exporting again.

Post your VBA code if you still have problems

--
HTH
Van T. Dinh
MVP (Access)






.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top