I have a report that opens from a button click with the following code :
I want to email the same report directly from another button click, but when I apply the following code it returns all items and not just the ones where PONumber matches:
How can I filter the SendObject command or is there an alternative way of doing this?
Carlp69
Code:
Dim stDocName As String
stDocName = "rpt_PO_Main"
DoCmd.OpenReport stDocName, acNormal, , "PONumber = " & Me!PONumber
I want to email the same report directly from another button click, but when I apply the following code it returns all items and not just the ones where PONumber matches:
Code:
Dim stDocName As String
stDocName = "rpt_PO_Main"
DoCmd.SendObject acReport, stDocName, acFormatRTF, , , , "Purchase Order No. PO" & PONumber & ", " & PODesc & "."
How can I filter the SendObject command or is there an alternative way of doing this?
Carlp69