dbTalk Databases Forums  

Exporting Query to text file

comp.database.ms-access comp.database.ms-access


Discuss Exporting Query to text file in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MikeZ
 
Posts: n/a

Default Exporting Query to text file - 11-06-2004 , 11:46 PM






Hi...

I have a access query that I need to export to a text file that is needed by
another application that requires a vbCrLf at the end of each record.
Unfortunately with all other text that is required, it is longer then 255
characters and cannot use the advance export because it puts a field
delimiter.

I am not much of an Access expert, but I currently use Excel and the Open
<fileName> For Output as #OutPutFile. And then at the end of the Loop, I
just use the Print #OutPutFile call to write to the file. That seems to work
fine.

I have tried the Advance Export, as well as DoCmd.Transfertext
acExportDelim, but there seems to be a limitation as to the number of
characters it outputs to the file as well as the field delimiter. I need to
output about 280 characters with vbCrLf at the end of each record.

As per my above excel example, is there anything similar in access that I
can use? Any suggestions would be greatly appreciated.

Thank you for your support
Mike



Reply With Quote
  #2  
Old   
Ken Snell
 
Posts: n/a

Default Re: Exporting Query to text file - 11-07-2004 , 07:24 AM






ACCESS VBA can use the standard Open .. for Output method, so you can use it
in ACCESS.

However, TransferText should work just fine for what you describe that you
want to do. Can you tell us some sample data records that you're trying to
export?

--

Ken Snell
<MS ACCESS MVP>

"MikeZ" <mzizek (AT) telus (DOT) net> wrote

Quote:
Hi...

I have a access query that I need to export to a text file that is needed
by
another application that requires a vbCrLf at the end of each record.
Unfortunately with all other text that is required, it is longer then 255
characters and cannot use the advance export because it puts a field
delimiter.

I am not much of an Access expert, but I currently use Excel and the Open
fileName> For Output as #OutPutFile. And then at the end of the Loop, I
just use the Print #OutPutFile call to write to the file. That seems to
work
fine.

I have tried the Advance Export, as well as DoCmd.Transfertext
acExportDelim, but there seems to be a limitation as to the number of
characters it outputs to the file as well as the field delimiter. I need
to
output about 280 characters with vbCrLf at the end of each record.

As per my above excel example, is there anything similar in access that I
can use? Any suggestions would be greatly appreciated.

Thank you for your support
Mike





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.