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 database records

2. Printing long records

3. Printing really long records.

4. Printing to file -> printing PCL file

5. Printing Long Comments

6. Printing long form problems

7. printing long memo fields with hp laser jet

8. Memo Field with long text - problem to print it

9. How to Cancel a long printing operations?

10. Printing long text field

11. Printing Long Text Fields

12. Printing long layouts


 
Powered by phpBB® Forum Software