Print Dialog

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

Surely you need the *report* to do the runcommand print? At present, you
have the *form* (which contains the command button) doing the runcommand
print. The report has not even been started then!

HTH,
TC
 
Hi,

I am trying to open Print Dialog "DoCmd.RunCommand acCmdPrint" with filter
to print one page but it gives me 30 pages (No Filer) plus one page
(filter). I don't know if I did wrong. Your help would be much
appreciated with your help.

Private Sub cmdPrintMyReport_Click()
Dim strFilter As String
Dim strDocName As String
Dim strCriteria As String

strDocName = "MyReport"
strCriteria = Me![RecordID]
strFilter = "[RecordID] = '" & strCriteria & "'"

DoCmd.RunCommand acCmdPrint

DoCmd.OpenReport strDocName, acNormal, , strFilter

End Sub
 
Back
Top