|
-
October 28th, 1998, 06:41 PM
#1
Displaying query results
I'm running a query from a Access Database file, and I'm trying to print out the results. Anyone know how to do this? thanks 
-
November 27th, 1998, 11:20 AM
#2
Re: Displaying query results
Alex-
I don't think there is a way to do it automatically. Try the standard VB Printer object. For example:
With Printer
.FontName = "Courier New"
.FontSize = "12"
'' Loop through a recordset
Do While (Not rs.EOF)
'' "With" doesn't work with Print statement
Printer.Print Trim$("" & rs(0))
rs.MoveNext
Loop
'' Print Document
.EndDoc
End With
Of course, if you are just testing, it's easiest just to dump the data into a textbox to view (make sure it is set for multiple lines)...
Do While (Not rs.EOF)
Text1.Text = Text1.Text & Trim$("" & rs(0)) & vbCrLf
rs.MoveNext
Loop
Hope this helps...
-Jim
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|