Help me send an email with just one record from a report

  • Thread starter Thread starter mjquinon via AccessMonster.com
  • Start date Start date
M

mjquinon via AccessMonster.com

PLZ Somebody help me with email just one record...

Here is what I currently have

DoCmd.SendObject acSendReport, "RptArSheet", "Snap", "", "", "", "", "",
False, ""

It send the whole report when I just want the current record of the report....
but i dont know how to do that plz help

Thanks
Mike
 
You need to filter the report in some way so that the report only contains
one record. You can either use a query for the recordsource of the report
and set criteria for the query to return one record or you can set a filter
in the report's properties.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
Ok, here is my set up... They input the data into a form. When everything is
all good and dandy they click a Save button. This saves prints and emails. It
prints the form fine.. I use an openform comand to do that.

Now the reason I have it email a report is because I cant send a snapshot
through form.

So now How do I add a fliter.... Should i do if Time and Date of record is
something then email
You need to filter the report in some way so that the report only contains
one record. You can either use a query for the recordsource of the report
and set criteria for the query to return one record or you can set a filter
in the report's properties.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
PLZ Somebody help me with email just one record...
[quoted text clipped - 9 lines]
Thanks
Mike
 
Steve said:
You need to filter the report in some way so that the report only contains
one record. You can either use a query for the recordsource of the report
and set criteria for the query to return one record or you can set a filter
in the report's properties.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)

--
You are *not* a resource at all !!
Stop advertising here, or get lost for another year or so...
http://home.tiscali.nl/arracom/whoissteve.html
(only this friday: 22 new visitors, 57 pageloads)

ArnoR
 
If you have Time and Date fields in your table, that's perfect!

Crate a query based on your table for the recordsource of your report. Make
the date field come before the Time field. Put the following in the criteria
of the Date field:
Forms!NameOfYourForm!NameOfYourDateFieldOnTheForm
Put the following in the criteria of the Time field:
Forms!NameOfYourForm!NameOfYourTimeFieldOnTheForm

In your code in the click event of the Save button, do the following in
sequence:
Save the record
Open the report
Print the report
Email the report

You should print reports, not forms!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)






mjquinon via AccessMonster.com said:
Ok, here is my set up... They input the data into a form. When everything
is
all good and dandy they click a Save button. This saves prints and emails.
It
prints the form fine.. I use an openform comand to do that.

Now the reason I have it email a report is because I cant send a snapshot
through form.

So now How do I add a fliter.... Should i do if Time and Date of record is
something then email
You need to filter the report in some way so that the report only contains
one record. You can either use a query for the recordsource of the report
and set criteria for the query to return one record or you can set a
filter
in the report's properties.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
PLZ Somebody help me with email just one record...
[quoted text clipped - 9 lines]
Thanks
Mike
 
Thanks for all the help your giving me show far.

I put in what you told me and i am getting a message box that says enter
parameter Value when I try to run the query.

So when I go to print my report I get an blank page.

My form is called AR Sheet
My Date field is Date
My Time field is Time

My Report is RptArSheet

What I am thinking is that the time field is recording when you open the form
so by the time you go to send it its a different time so it sends a blank
page. What do you think?

Thanks again

If you have Time and Date fields in your table, that's perfect!

Crate a query based on your table for the recordsource of your report. Make
the date field come before the Time field. Put the following in the criteria
of the Date field:
Forms!NameOfYourForm!NameOfYourDateFieldOnTheForm
Put the following in the criteria of the Time field:
Forms!NameOfYourForm!NameOfYourTimeFieldOnTheForm

In your code in the click event of the Save button, do the following in
sequence:
Save the record
Open the report
Print the report
Email the report

You should print reports, not forms!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
Ok, here is my set up... They input the data into a form. When everything
is
[quoted text clipped - 24 lines]
 
ok so instesd of creating a criteria for time and Date i did it for the AR
Number and it works like a charm.(SO Far)

Thanks for your help
If you have Time and Date fields in your table, that's perfect!

Crate a query based on your table for the recordsource of your report. Make
the date field come before the Time field. Put the following in the criteria
of the Date field:
Forms!NameOfYourForm!NameOfYourDateFieldOnTheForm
Put the following in the criteria of the Time field:
Forms!NameOfYourForm!NameOfYourTimeFieldOnTheForm

In your code in the click event of the Save button, do the following in
sequence:
Save the record
Open the report
Print the report
Email the report

You should print reports, not forms!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
Ok, here is my set up... They input the data into a form. When everything
is
[quoted text clipped - 24 lines]
 

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

Back
Top