Exporting to TXT file - Am I missing something?

M

ManningFan

I'll try to give the basics here and not overload anyone with
information.

I'm exporting some data to a text file. I need to print a header, loop
through some code pulling necessary info, then print a footer.

I'm using the following code:
Print #2, strCodeLine

The problem is, I use it to print the header, body and footer. In
between each section it's automatically inserting a blank line, which
is screwing up what I'm trying to do.

Is there any way to force Access to NOT print a blank line each time it
runs that line of code?
 
J

John Nurick

I can only think of two possibilities.

1) Print # normally outputs a CR LF after whatever you tell it to print,
so if strCodeLine itself ends with CR LF you'll get a blank line.

2) Somehow your code is going once too often round its loops, and
calling Print # an extra time with an empty strCodeline.

BTW, Help for the Print # statement mentions that you can stick a ';' on
the end of the statement to suppress the usual CR LF.
 

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