Jump to content
Can't remember your login details? Read more... ×
Sign in to follow this  
TheSecret

MS Access macro problem

Recommended Posts

Hi All,

 

I apologize for asking what is probably a very simple query in here, but I have been trying to work this out for the last few hours and cannot find the solution.

 

I have made a simple macro in access using transfer text, that will export to a tab delimited format using a defined spec. I have put x.txt as the file to export to. However, wherever I put x.txt and however I specify it, it cannot be found. I have tried c:/x.txt, x.txt /x.txt etc...nothing works. I have created the file and it has full permissions. Is there a trick to this I am not getting?

Share this post


Link to post
Share on other sites

Secret ... why are you using forward slashes! It's not Unix.

It is c:\x.txt ... use backslashes in DOS and Windows not a silly forward slash.

 

Try running the export macro without the file being there.

 

PS: I'm the type of programmer who writes these kinda things using VBA directly. I don't use Macros.

Edited by Jeruselem

Share this post


Link to post
Share on other sites

Sorry, I meant to type backslashes in my post, I am using backslashes in the macro and it fails to work with or without the file present.

Share this post


Link to post
Share on other sites

Sorry, I meant to type backslashes in my post, I am using backslashes in the macro and it fails to work with or without the file present.

I was playing with export ... have you tried "Export Word for Windows Merge"?

 

My approach to getting your defined spec is to create a query which displays exactly what you want to export and using that instead of those annoying export specs.

Edited by Jeruselem

Share this post


Link to post
Share on other sites

I found the problem, it gives that misleading error when there is a problem in the query. However the query works fine so I have to try and figure that out now. Thanks though.

Share this post


Link to post
Share on other sites

If you have a query that contains parameters, they behave differently when you are interactive/non-interactive!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×