Alex
October 28th, 1998, 05:41 PM
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 ;)
|
Click to See Complete Forum and Search --> : Displaying query results Alex October 28th, 1998, 05:41 PM 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 ;) James Grant November 27th, 1998, 10:20 AM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |