Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db listbox - printing results to printer

Status
Not open for further replies.

datamasher

Technical User
Dec 31, 2001
69
GB
After making a query on an access database my db listbox is populated with the results. I want to then print these results out on a printer. How do I do this in code.
 
This is pretty basic (no pun intended) but should do the trick. With some tweaking you can better format the layout of the output.

Private Sub PrintListBox
Dim n as Integer

For n=1 To List1.ListCount-1
List1.ListIndex=n
Printer.Print List1.Text
Next
End Sub

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top