Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't I export text files in Access 97

Status
Not open for further replies.

KenG

Technical User
Mar 20, 2000
67
US
I am trying to export a series of records as individual delimited text files. I thought I could easily do this using a macro and not have to use VB (I'm still a novice at VB). <br><br>I have a query with 4 records that have to be exported as 4 individual text files. My macro opens the query, pastes the individual record into another table, exports the table (that contains only this one record) using TransferText, then deletes this record in the table, selects the query again, copy the next record in the query and paste it into the table to be exported. <br><br>The text file is created but there is nothing in it!<br><br>I've used the default specification and my own specification and get the same results.<br><br>Am I missing something simple?
 
Try leaving the Delete records portion out for a test and see if you still have a blank text file.<br>Also<br>If you have to go the VBA route you wil want to create an Export specification file.<br><br>Click &quot;File&quot; menu then &quot;Save As/Export&quot; to external file<br>There is an option to Save the Specification.<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you.
 
Getting rid of the delete didn't help. I played around with the macro a little more and got it to work by closing the table. I think that makes sense to me -- the record has to be saved before it can be exported. Is that right?<br><br>This macro will work for the short term, but I'd really like to make this more general, i.e. be able to export any number of records, and save the files in any directory. <br><br>So, I guess if I want to do that I have to use VB. <br>Any suggestions about how to proceed?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top