Send a single report


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.
 
Ad

Advertisements

S

Steve Schapel

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]
 
S

Steve Schapel

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]
 
I

Indyexe

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.
 
I

Indyexe

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.
 
S

Steve Schapel

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")
 
Ad

Advertisements

S

Steve Schapel

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")
 
I

Indyexe

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 ?
 
Ad

Advertisements

I

Indyexe

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top