C
Christine
Dear Helpful People,
I read Cheryl Fisher's response of 26-Feb to Jim S.
concerning Jim's question about sending a current report
via Email, and have taken her advice for my own
situation, but am still having difficulties getting a
report for the correct record. It may not matter that I'm
tring to email the report, since it doesn't work even
without the email, but I'm including the email bits so
the context is complete.
I have a data entry form called frmServiceRequests. From
there, the following code executes:
DoCmd.SendObject acSendReport, "rptRequestNotice",
acFormatRTF, _
strToAddress, , , _
"Service Request for Your Review", _
"Message text", , False
It works fine except the wrong report appears in the
email attachment. (Note it doesn't work even just opening
the report to the screen.)
The report (rptRequestNotice) is based on
qryRequestNotice, where the Criteria is set to:
"ServiceNum"=[Forms]![ServiceRequests]![ServiceNum])
This doesn't work: A box appears asking for Parameter
Values.
So, I've tried removing the criteria from
qryRequestNotice and putting the following into the
report (rptRequestNotice):
Record Source: qryServiceRequests
Filter: (ServiceNum = Forms![frmServiceRequests]!
ServiceNum)
That doesn't work either.
I've tried storing ServiceNum as a Public Variable in
frmServiceRequests and making the appropriate changes in
the query/report -- again, to no avail.
Can someone please tell me....What AM I doing wrong??
PS: I've included the information for the email because,
although False is set so the Outlook dialog doesn't
appear, it still does. I've posted a separate question to
this, but if there is anyone who knows what's up with
this in this post, I'd be mucho obliged!
Ta,
Christine
I read Cheryl Fisher's response of 26-Feb to Jim S.
concerning Jim's question about sending a current report
via Email, and have taken her advice for my own
situation, but am still having difficulties getting a
report for the correct record. It may not matter that I'm
tring to email the report, since it doesn't work even
without the email, but I'm including the email bits so
the context is complete.
I have a data entry form called frmServiceRequests. From
there, the following code executes:
DoCmd.SendObject acSendReport, "rptRequestNotice",
acFormatRTF, _
strToAddress, , , _
"Service Request for Your Review", _
"Message text", , False
It works fine except the wrong report appears in the
email attachment. (Note it doesn't work even just opening
the report to the screen.)
The report (rptRequestNotice) is based on
qryRequestNotice, where the Criteria is set to:
"ServiceNum"=[Forms]![ServiceRequests]![ServiceNum])
This doesn't work: A box appears asking for Parameter
Values.
So, I've tried removing the criteria from
qryRequestNotice and putting the following into the
report (rptRequestNotice):
Record Source: qryServiceRequests
Filter: (ServiceNum = Forms![frmServiceRequests]!
ServiceNum)
That doesn't work either.
I've tried storing ServiceNum as a Public Variable in
frmServiceRequests and making the appropriate changes in
the query/report -- again, to no avail.
Can someone please tell me....What AM I doing wrong??
PS: I've included the information for the email because,
although False is set so the Outlook dialog doesn't
appear, it still does. I've posted a separate question to
this, but if there is anyone who knows what's up with
this in this post, I'd be mucho obliged!
Ta,
Christine