473,321 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

How send individual report to individual email

I have a report of n pages. Each page is a record of different student result information and the student's email address. The report is already filtered out from a query. I want a code that will mail each student's result to the student's corresponding email address directly from access without usiing Outlook. Please, your help will be highly appreciated.

Thank you.
Kennedy Orah
Jul 11 '18 #1
6 1763
twinnyfo
3,653 Expert Mod 2GB
Kenorah123,

Welcome to Bytes!

There are mainly two ways to accomplish this:
  • You can use a filter on the Report which is activated in the VBA module behind the report, using a Global Variable which established the filter for that report, save it, and then e-mail it OR
  • You can have the query used as the record source for the Report use similar variables for changing the records returned.

Neither option is extremely complex, but it canbe tricky. This all depends upon your currently level of comfort using VBA.

Without additional details, we can't provide you any more detailed guidance.
Jul 11 '18 #2
Thank you, please, I need more guidance. The detail is: have a report of n pages. Each page is a record of different student result information and the student's email address. The report is already filtered out from a query. I want a code that will mail each student's result to the student's corresponding email address directly from access without usiing Outlook. Please, your help will be highly appreciated.

Thank you.
Kennedy Orah
Jul 11 '18 #3
twinnyfo
3,653 Expert Mod 2GB
Thanks, but you haven't given me anything new.

This solution is fairly straightforward, but I don't know your level of expertise in VBA. I don't know anything about your tables and queries behind this report. I don't know how you are intending to send the Report (you can use SendObject or initiate MS Outlook).

Additionally, and most importantly, you have not shown us what you have tried so far. The experts (and probably most all the others) on this forum have jobs and we don't have time to build something from scratch. We are glad to help troubleshoot your work or guide you through to a solution.
Jul 11 '18 #4
zmbd
5,501 Expert Mod 4TB
The catch here is mailing without using Outlook as many IT groups are now disabling the CDO or not allowing the CDO to connect to the exchange server.

You will also need to know your SMTP server information such as name and the port it's operating (typically 25) without that information it will be more difficult, if even possible.

What is the particular reason you do not want to use Outlook for the email?
Jul 11 '18 #5
Thank you for willing to help. I am fairly good in VBA. My report name is: "primary each class". The report is derived from "primary each class" query as it's record source. Both the query and the report contains among other fields: studentid, studentemail, etc. I have used EmailDatabaseObject (Access 2016)SendObject macro action, but sends the entire report to all the email provided without filtering them. I don't really mind whether outlook is used or directly send from access as long as it loops and send individual record to individual emailaddress at the click of a button. Your help will be greatly appreciated.
Kennedy
Jul 11 '18 #6
zmbd
5,501 Expert Mod 4TB
Kenorah123
Ok, that's the normal behavior for a report see my answer here:
https://bytes.com/topic/access/answe...rt#post3817305

Report sent with the SendObject are sent "As Is" found if opened directly.

More than likely with a slight modification to your query that the report is based on using the [TempVars] as shown in the above answer, your vba can set a variable, for example [TempVars]![StudentID], to the value of the student's record you want to send the report for, the query uses this value in the WHERE condition. The query executes, the report is generated, and then is opened for preview, printed, or emailed. The beauty of the [TempVars] is that it is stabled until the current session is closed or it is explicitly cleared.

In anycase... in your code, create your recordset, loop through the recordset and set [TempVars]![StudentID], send your reports.

:)
Jul 12 '18 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kenshin | last post by:
Hey! I have another script where i pull all the information from the database and I want to send it to the person. What they do is they enter in their email, and if the email matches, than it will...
2
by: Will | last post by:
I am trying to send a report by email using DoCmd.SendObject acSendReport. When I send the report, it sends the report with all the records whereas I only want the report to show one record. I...
2
by: Dave Bartlett | last post by:
Hello, Just wondering if anyone new of a nice way to capture ASP.NET page error reports at runtime and deliver them via email? Thanks
7
by: Martin | last post by:
Hi, I have a standard aspx page (form) that contains a few user controls. Upon form submission the page is validated. If validation passses then a text based email is sent. This is all working...
1
by: mrajanikrishna | last post by:
Hello Friends, I am generating two reports but two files. First report is Shipment Booking Form. After generating this form, I want to send to the cargo management by email. As far everything...
1
by: noel.tock | last post by:
Hi all, Thank you already for the amount of information that has collected in this group, very helpful indeed. I have a question in regards to setting up individual emails to be sent based on a...
2
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not...
6
by: plaguna | last post by:
How can I sent a Report via Email with a *.mdb output format. Access gives me the option to send an email only as HTML (*.htm,*.Html), Rich Tex Format (*.rtf), Snapshop Format (*.snp), and Text...
1
by: rameshbabu1251 | last post by:
hi i am trying send some data to email in php but i am getting below warning Warning: mail() : Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in...
8
by: eltigreferoz | last post by:
Hello. I've been trying to create a button on my ACCESS 2007 form that will send a pdf via email of a single record. At the moment (and using code from a previous forum) I have been successful in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.