Question : compile error - invalid use of property on acFormatPDF

I am trying to write a simple code to send a report and am getting a compile error on the report format. Please help me. I thought I could use this format.

Thanks.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
DoCmd.SendObject _
    acSendReport, _
    "Job Booking Check List Report", acViewPreview, , "JobID=" & Me.JobID
    acFormatPDF , _
    "[email protected];" _
    , _
    , _
    , _
    "Copy of the Job Booking Check List for Job Number " & [JobNo] & ": " & [JobName] & " is attached", _
    "Steve, Attached is the Job Booking Check List for Job Number " & [JobNo] & ": " & [JobName] & ".", _
    True
Open in New Window Select All

Answer : compile error - invalid use of property on acFormatPDF

There is no argument for SendObject that allows you to specify the criteria of what you send.

I don't think you can actually use SendObject to directly send a specific record.

The only way I could think you could do it would be to set up a query that took a parameter so that it only returned the one record you were interested in.

And you wouldn't be able to use that directly with SendObject, you would need to somehow allow the query to access the parameter or have the user input it.
Random Solutions  
 
programming4us programming4us