By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

VBA for printing a query's dynaset?

P: n/a
MLH
Without building a report, can VBA simply print
a query's dynaset - much in the same manner
one would by opening the query manually from
the database window and clicking File, Print?
Apr 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
MLH
I was thinking along the lines of...

DoCmd.OpenQuery "_Query4", acViewNormal
DoCmd.DoMenuItem acFormBar, acFileMenu, acPrint, , acMenuVer70

.... but it didn't work for me.
Apr 12 '06 #2

P: n/a
MLH
This is as close as I can get to it...

Private Sub Command0_Click()
DoCmd.OpenQuery "_Query4", acViewNormal
DoCmd.DoMenuItem acFormBar, 0, 9, , acMenuVer70
DoEvents
SendKeys "~", True
DoCmd.DoMenuItem acFormBar, 0, 3, , acMenuVer70
End Sub

That isn't working either. Can't get past the Printer Dialog box.
Apr 12 '06 #3

P: n/a
On Tue, 11 Apr 2006 21:48:39 -0400, MLH wrote:
This is as close as I can get to it...

Private Sub Command0_Click()
DoCmd.OpenQuery "_Query4", acViewNormal
DoCmd.DoMenuItem acFormBar, 0, 9, , acMenuVer70
DoEvents
SendKeys "~", True
DoCmd.DoMenuItem acFormBar, 0, 3, , acMenuVer70
End Sub

That isn't working either. Can't get past the Printer Dialog box.

DoCmd.SelectObject acQuery, "qryNMame", True
DoCmd.PrintOut , , , , 1
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Apr 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.