Send a single report

  • Thread starter Thread starter Indyexe
  • Start date Start date
I

Indyexe

I am trying to send a single report by email and have used a button and the
sendobject macro command on a form but it tries to send every record. I can
limit the veiw to just one report using coding but thought a macro might be
better. Is there a way for a macro to limit sending just the current report
and to add data from the form to be put in the 'subject' line or is coding
the better option ?

Many thanks for any help.
 
Indyexe,

The best way to handle this is to base your report on a query, in which you
enter the criteria to restrict the data printed to the report to the
required record.

This often ends up being a reference in the query criteria to the value of a
control in the current record on a form, using syntax such as:
[Forms]![NameOfForm]![NameOfControl]
 
Indyexe,

The best way to handle this is to base your report on a query, in which you
enter the criteria to restrict the data printed to the report to the
required record.

This often ends up being a reference in the query criteria to the value of a
control in the current record on a form, using syntax such as:
[Forms]![NameOfForm]![NameOfControl]
 
Steve

Many thanks - that has enabled me to open just a single report.

Would you know how to add data from one of the input boxes as the subject
line in the email generated ?

Thanks again for your help.



Steve Schapel said:
Indyexe,

The best way to handle this is to base your report on a query, in which you
enter the criteria to restrict the data printed to the report to the
required record.

This often ends up being a reference in the query criteria to the value of a
control in the current record on a form, using syntax such as:
[Forms]![NameOfForm]![NameOfControl]

--
Steve Schapel, Microsoft Access MVP


Indyexe said:
I am trying to send a single report by email and have used a button and
the
sendobject macro command on a form but it tries to send every record. I
can
limit the veiw to just one report using coding but thought a macro might
be
better. Is there a way for a macro to limit sending just the current
report
and to add data from the form to be put in the 'subject' line or is coding
the better option ?

Many thanks for any help.
 
Steve

Many thanks - that has enabled me to open just a single report.

Would you know how to add data from one of the input boxes as the subject
line in the email generated ?

Thanks again for your help.



Steve Schapel said:
Indyexe,

The best way to handle this is to base your report on a query, in which you
enter the criteria to restrict the data printed to the report to the
required record.

This often ends up being a reference in the query criteria to the value of a
control in the current record on a form, using syntax such as:
[Forms]![NameOfForm]![NameOfControl]

--
Steve Schapel, Microsoft Access MVP


Indyexe said:
I am trying to send a single report by email and have used a button and
the
sendobject macro command on a form but it tries to send every record. I
can
limit the veiw to just one report using coding but thought a macro might
be
better. Is there a way for a macro to limit sending just the current
report
and to add data from the form to be put in the 'subject' line or is coding
the better option ?

Many thanks for any help.
 
Indyexe,

If you have a textbox on a form, which contains the information you want in
the email Subject header, and it is from an event on that form that you are
launching the macro, then you can put like this in the Subject argument of
the SendObject macro:
=[NameOfYourTextbox]

Of you want to combine the contents of the textbox with other text, you can
do it like this:
="Summary for " & [NameOfYourTextbox] & " " & Format(Date(),"dd/mm/yy")
 
Indyexe,

If you have a textbox on a form, which contains the information you want in
the email Subject header, and it is from an event on that form that you are
launching the macro, then you can put like this in the Subject argument of
the SendObject macro:
=[NameOfYourTextbox]

Of you want to combine the contents of the textbox with other text, you can
do it like this:
="Summary for " & [NameOfYourTextbox] & " " & Format(Date(),"dd/mm/yy")
 
Thanks Steve for your reply.

That has helped me a lot.

Thanks again for your help and time.



Steve Schapel said:
Indyexe,

If you have a textbox on a form, which contains the information you want in
the email Subject header, and it is from an event on that form that you are
launching the macro, then you can put like this in the Subject argument of
the SendObject macro:
=[NameOfYourTextbox]

Of you want to combine the contents of the textbox with other text, you can
do it like this:
="Summary for " & [NameOfYourTextbox] & " " & Format(Date(),"dd/mm/yy")

--
Steve Schapel, Microsoft Access MVP


Indyexe said:
Steve

Many thanks - that has enabled me to open just a single report.

Would you know how to add data from one of the input boxes as the subject
line in the email generated ?
 
Thanks Steve for your reply.

That has helped me a lot.

Thanks again for your help and time.



Steve Schapel said:
Indyexe,

If you have a textbox on a form, which contains the information you want in
the email Subject header, and it is from an event on that form that you are
launching the macro, then you can put like this in the Subject argument of
the SendObject macro:
=[NameOfYourTextbox]

Of you want to combine the contents of the textbox with other text, you can
do it like this:
="Summary for " & [NameOfYourTextbox] & " " & Format(Date(),"dd/mm/yy")

--
Steve Schapel, Microsoft Access MVP


Indyexe said:
Steve

Many thanks - that has enabled me to open just a single report.

Would you know how to add data from one of the input boxes as the subject
line in the email generated ?
 
Back
Top