Hi everyone,
I want to send an email using sendobject but i want to add a Where criteria to it. for example i have:
stDocName = "Invoice"
Job = Me!Job_Number
DateR = Me!Date_Requested
strToWhom = InputBox("Enter recipient's e-mail address.", _
"Enter Email Address")
DoCmd.SendObject acSendReport, stDocName, ".rtf", strToWhom, , , " Job Number " & Job & " Requested " & DateR
This works fine but it brings up all the records for the report "Invoice", i want to be able to filter a single record to email instead all of the records. I have the following but not sure where to insert it.
stLinkCriteria = "[Job_Number]=" & "'" & Me![Job_Number] & "'"
The first job number refers to the field on the report and the second refers to the field on the form. Whatever record is shown on the form i want that to be filtered on the report so i can send the individual record. Hope that makes sense. Any Suggestions would be great.
Regards,
Nim
I want to send an email using sendobject but i want to add a Where criteria to it. for example i have:
stDocName = "Invoice"
Job = Me!Job_Number
DateR = Me!Date_Requested
strToWhom = InputBox("Enter recipient's e-mail address.", _
"Enter Email Address")
DoCmd.SendObject acSendReport, stDocName, ".rtf", strToWhom, , , " Job Number " & Job & " Requested " & DateR
This works fine but it brings up all the records for the report "Invoice", i want to be able to filter a single record to email instead all of the records. I have the following but not sure where to insert it.
stLinkCriteria = "[Job_Number]=" & "'" & Me![Job_Number] & "'"
The first job number refers to the field on the report and the second refers to the field on the form. Whatever record is shown on the form i want that to be filtered on the report so i can send the individual record. Hope that makes sense. Any Suggestions would be great.
Regards,
Nim