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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Query Results in Access

Status
Not open for further replies.

sntnkndg

Programmer
Jun 18, 2007
5
DE
Hello Everybody,

I must admit that I am newbie in Access VBA and need some basic guidance.

I have an access form with a PRINT button. Once pressed, the program is supposed to run a query and print out the results in some specific structure in excel format.

Could you kindly suggest how to approach this situation. If possible could anyone provide me an example.

The report should be in landscape format and the headers should repeat on top of each page.

Please let me know if you need some more information.

Regards,
SanK
 
Why not create a report based on the query you need to print. Set the report to look how you want, e.g. Landscape and the headers can be set in the Page Header section on the report so they print on each page.

Then, the Event procedure for the OnClick eent of your print button will be something like:

DoCmd.OpenReport "YourReportName"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top