error when I add print button for printing a repor
I add a printing button in a form to print the related field in a report. I add VAB code shows below:
Dim stDocName As String
Dim strFilter As String
stDocName = "RPT Order"
strFilter = "OrderID = Forms![FRM Order New]!OrderID"
DoCmd.OpenReport strDocName, acViewNormal, , strFilter
but when I clink on printing button, it give me "The action or method requires a report name argument"
I have no ideal about that. can someone help me? Thanks
|