Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2008

Tip: Looking for answers? Try searching our database.

Print Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ghagg - 30 Jul 2008 21:18 GMT
I have used the following code to print contents of a listbox, which works
well.  One little problem, this print function only prints a 1" wide column.
What can i do something to widen the column to say 2" or more?

Thanks
gh

Private Sub cmdPrintClass1_Click()
       CurrentDb.QueryDefs("PrintQuery").SQL = Me![ListClass1].RowSource
       DoCmd.OpenQuery "PrintQuery"
       DoCmd.PrintOut
       DoCmd.Close acQuery, "PrintQuery"
End Sub
Douglas J. Steele - 31 Jul 2008 01:25 GMT
Realistically, queries aren't intended to be printed. Create a report that's
formatted how you want it, and then print the report.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I have used the following code to print contents of a listbox, which works
>well.  One little problem, this print function only prints a 1" wide
[quoted text clipped - 9 lines]
>        DoCmd.Close acQuery, "PrintQuery"
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.