Printing long records to file with long print stmt 
Author Message
 Printing long records to file with long print stmt

Greetings all -

I am having difficulty dumping data out of Access 2.0 using the
PRINT # statement.  I want to output a 2,052-character record to
a file when the user clicks a button.  The print statement gets
rather length, definitely greater than allowed on one VB procedure
line.  

My complete print statement would look something like this (if you
can imagine a whole lot of Vars and Tabs where i've got <a lot more>).

Print #1, Tab(10), Var1, Tab(20), Var2, <a lot more>, Tab(2050), Var100

The problem seems to be that there is no continuation character in
Access 2.0 VBA, so it is difficult to build the proper print
statement.  To get around that, I thought i could store the code in
strings and then print the strings, like so:

String1 = "Tab(10), Var1, Tab(20), Var2,"
String2 = "Tab(30), Var3, Tab(40), Var4,"
etc
String100 = "Tab(2030), Var98, Tab(2040), Var99, Tab(2050), Var100"

Print #1, String1 & String2 & String3 & ... & String100

but of course that doesn't work -- it just prints the Print statement
argument string, not the contents of the argument string.  I guess i'm
looking for some trick or function like Val that i could put in there
to evaluate the contents of the string, something like:

Print #1, Val(String1) & Val(String2) & Val(String3) etc Val(String100)

which of course just prints a bunch of zeros.

Any ideas?

Thanks!
Howard



Sat, 15 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. printing long strings with printer.print

2. Internet Transfer Control: Retreiving Files via FTP - LONG, LONG Disconnect/Close

3. Printing Long Forms

4. Help printing a long form

5. How to trancate when printing a long line.

6. ** Printing long lines in VB

7. Printing long text

8. Printing takes to long

9. vb3 - writeprofilestring & print manager -long

10. Help: How to print a long string ?

11. Printing Long forms, VB6

12. Printing out long report in Reverse Page Order

 

 
Powered by phpBB® Forum Software