How can I print a query using a command button?

F

fredg

If you have a question, the place to ask it is here in this big white
space.
Just remember that queries are for record filtering and manipulation,
not for printing.
Create a report, using the query as it's record source,
Print the report.
 
A

alexr114

Is there anyway to print the datasheet of the query out using the command
buttons from a form?
 
F

fredg

Is there anyway to print the datasheet of the query out using the command
buttons from a form?

Look up the SelectObject and the PrintOut methods in VAB help.

To print out a query that is not open:
DoCmd.SelectObject acQuery, "QueryName", True
DoCmd.PrintOut

To print out a query that is already open, change the True to False.
 
Top