How do i email an individual report from a form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have setup a Macro to send reports to outlook from a command button on a
form that is linked to the report. However, the attachment always contains
all reports, i would like it to just email the current report ( a purchase
order) or perhaps enable to enter the purchase order number which i want to
send. Any ideas?
 
If the report record source is a query you can use the primary key from your
PO Table, possibly PO Number, to sort out the current record. In the criteria
row of your primary key add the criteria
=Forms![MyFormName]![PrimaryKeyFieldName] OR you could just enter [Enter the
PO Number] in the criteria row of the query under the PO Number field.
 
solsk said:
I have setup a Macro to send reports to outlook from a command button on a
form that is linked to the report. However, the attachment always contains
all reports, i would like it to just email the current report ( a purchase
order) or perhaps enable to enter the purchase order number which i want to
send. Any ideas?

Hi

You could also try this

Create an "open form" macro and insert it before the "send object"
macro.

Report name is your reports name which should be in the list .
View is. Print preview.
Leave the. filter. blank.
Where condition is,
[your field name]=[Forms]![Your form name]![your field name]

Put this macro into the on click part of your command button it should
then open the report for the record on display generating the
attachment to email all you need to do then is type in the reciepient.

I am using access 2000 and it works perfectly.
Please reply to this news group if you have any joy

Good luck
Mike
 
Thanks Mike
that seems to be working a treat!
Cheers

Mike said:
solsk said:
I have setup a Macro to send reports to outlook from a command button on a
form that is linked to the report. However, the attachment always contains
all reports, i would like it to just email the current report ( a purchase
order) or perhaps enable to enter the purchase order number which i want to
send. Any ideas?

Hi

You could also try this

Create an "open form" macro and insert it before the "send object"
macro.

Report name is your reports name which should be in the list .
View is. Print preview.
Leave the. filter. blank.
Where condition is,
[your field name]=[Forms]![Your form name]![your field name]

Put this macro into the on click part of your command button it should
then open the report for the record on display generating the
attachment to email all you need to do then is type in the reciepient.

I am using access 2000 and it works perfectly.
Please reply to this news group if you have any joy

Good luck
Mike
 
I've tried this like 20 times today to no avail. I keep getting all my
purchase orders in the pdf format instead of just the one record. Everything
else works as far as opening up Outlook and attaching the pdf file, but
selecting just the last record I was working on in a form isn't cutting it. I
see a lot of the VB command lines in other areas of this forum, but I'm not
that savvy to writing code. Any ideas on what's up? Using Access 2007. Thanks!

solsk said:
Thanks Mike
that seems to be working a treat!
Cheers

Mike said:
solsk said:
I have setup a Macro to send reports to outlook from a command button on a
form that is linked to the report. However, the attachment always contains
all reports, i would like it to just email the current report ( a purchase
order) or perhaps enable to enter the purchase order number which i want to
send. Any ideas?

Hi

You could also try this

Create an "open form" macro and insert it before the "send object"
macro.

Report name is your reports name which should be in the list .
View is. Print preview.
Leave the. filter. blank.
Where condition is,
[your field name]=[Forms]![Your form name]![your field name]

Put this macro into the on click part of your command button it should
then open the report for the record on display generating the
attachment to email all you need to do then is type in the reciepient.

I am using access 2000 and it works perfectly.
Please reply to this news group if you have any joy

Good luck
Mike
 
Mark,

How do you print the report? Button on a form?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Mark said:
I've tried this like 20 times today to no avail. I keep getting all my
purchase orders in the pdf format instead of just the one record.
Everything
else works as far as opening up Outlook and attaching the pdf file, but
selecting just the last record I was working on in a form isn't cutting
it. I
see a lot of the VB command lines in other areas of this forum, but I'm
not
that savvy to writing code. Any ideas on what's up? Using Access 2007.
Thanks!

solsk said:
Thanks Mike
that seems to be working a treat!
Cheers

Mike said:
solsk wrote:
I have setup a Macro to send reports to outlook from a command button
on a
form that is linked to the report. However, the attachment always
contains
all reports, i would like it to just email the current report ( a
purchase
order) or perhaps enable to enter the purchase order number which i
want to
send. Any ideas?

Hi

You could also try this

Create an "open form" macro and insert it before the "send object"
macro.

Report name is your reports name which should be in the list .
View is. Print preview.
Leave the. filter. blank.
Where condition is,
[your field name]=[Forms]![Your form name]![your field name]

Put this macro into the on click part of your command button it should
then open the report for the record on display generating the
attachment to email all you need to do then is type in the reciepient.

I am using access 2000 and it works perfectly.
Please reply to this news group if you have any joy

Good luck
Mike
 
Back
Top