E-mail Current Record on Form/Command Button Wizard Not Working

yourfriendangela

Registered User.
Local time
Today, 04:20
Joined
Jul 24, 2012
Messages
22
Hello,

Ok, so it's still hard to believe that I can't get this process to work. I'm so frustrated. Someone please help! You would be a saint...

So, I've created a report which I want to put command buttons on.
I want one to e-mail out the current record, and to be able to do this for each record in the report. I've tried using VBA code as such to filter it to the current record:

Me.Filter = "ID='" & Reports![PantryTierReports]![ID] & "'"
Me.FilterOn = True

My primary key is "ID" and I've named the control "ID" in the report.

This code doesn't work.

Now, what is also frustrating is that my wizard does not open specifically when I try to put a command button on the report. Why is this?
I have turned on "Use Control Wizard." And the wizard opens for other controls...
Help!
 
This is what I did in the On Click of a command button to email the current record on my form:
Code:
 DoCmd.OpenForm "frmrptCurrentRecordInvoice", acPreview, , "[InvoiceID]= forms!frmInvoicing![InvoiceID]"
    DoCmd.SendObject acForm, "frmrptCurrentRecordInvoice", "PDFFormat(*.pdf)", "", "", "", "Invoice", "Hello,  attached you will find a PDF of your current invoice.", True, ""
[\code]
 

Users who are viewing this thread

Back
Top Bottom