Emailing Of Reports
Jun 15, 2006hi!
I'm a student It's just my first time to program in MS access and my project requires to automatically send email reports from MS Access...how can i do it??
hi!
I'm a student It's just my first time to program in MS access and my project requires to automatically send email reports from MS Access...how can i do it??
I'm working on a project where I must send roughly a thousand individual reports to a thousand different email recipients with .pdf attachment.I know I'll need to add a table that designates the email address by SHIP_TO_CODE. Then create a form with the email subject, body, etc.. I don't neccessarily have to have the reports saved to a folder; I really just need them emailed to each account.
I was thinking I could modify the code some to accomplish my goal, but I'm not sure what to put. Maybe add a SendObject in there somewhere.CODE that I have now that saves the report to a folder. (I want to modify some to send email attachement instead)
''Module CODE:
Private Sub Form_Current()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT DISTINCT [SHIP_TO_CODE] FROM [qryWty&PendingData];", dbOpenSnapshot)
Do While Not rst.EOF
strRptFilter = "[SHIP_TO_CODE] = " & Chr(34) & rst![SHIP_TO_CODE] & Chr(34)
DoCmd.OutputTo acOutputReport, "rptDraft", acFormatPDF, "C:UsersmrutherfordDesktopASC Daily Reports" & "" & rst![SHIP_TO_CODE] & ".pdf"
[code]....
I run a end of day report of daily sales by territory in NA. Currently I run a query to list the territories with sales then run a report for each territory listed showing their unique sales.I would like to create a macro that reviews the list of territories and then emails the report for each territory.Each territory has a macro with the report and email address loaded I just need something to execute the list.It is important that a report is not sent to territories with zero sales so just sending a report to everyone will not work.
View 4 Replies View RelatedI have many reports that are structured differently, many are grouped by semester.
What I do now, is put a button on each grouping of the report I want to email from and use the current semester (Sem) which is also a query parameter to filter the report.
Here is my current code which works fine:
Sub EmailFromReport(rpt As Report, Optional Sem As Variant)
Dim db As Database
Dim qry As QueryDef
Dim rs As Recordset
Dim Bcc As String
Dim Subject As String
Set db = CurrentDb
Set qry = CurrentDb.QueryDefs(rpt.RecordSource)
'set query parameters
[code]....
The problem is, I need to be able to filter these queries on other criteria besides the semester.
My first idea was to use if statements to skip the records I don't want. This is messy and the report structures are different so I run into issues when using optional parameters because not all the reports are structured the same.
The best solution I have come up with so far is using a wherefilter parameter, stripping the semi colon off the querydef sql and surrounding the sql with a qrydef.SQL = "SELECT Email1, Email2 FROM (" qrydef.SQL ") WHERE " & wherefilter.
The problem is this, changes the original query, and I can't figure out how to copy a query with db.CreateQueryDef If i do db.CreateQueryDef("tempqry",qrydefSQL), I lose the query parameters.
Is there a better way to do this? If this is the best way, how do you take an existing query and make a copy of it?
I have a database that is strictly for generating and printing work orders. Our supervisors use it to print new work orders on the fly. normally that is fine. I have the Vb to print that specific work order
what I need to create is a VB that would allow other people to create a work order that would email it to the those supervisors. email addresses will always be the same. I just dont want to send the entire report.
My database is stores information about students such as name, student number, programme, email, etc. I have a STUDENT form with this information visible.
I also have a another table and MARKS sub form that contains the details of courses completed by the student and results. I have placed the sub form in the STUDENT form and can see each student's details and a list of their courses.
I want to be able to send this information to the relevant student via email. The student should only receive his information and no one else's.
Can this be done? Do I need to create a report first? Should I be using WORD to produce the emails?
I've created an accounts package for my business using access 2003 and I'm just thinking of some time saving features.
We need to email our invoices to our clients.
Normally we print out an invoice, scan it back into the computer, save as a PDF and attach to an email manually one by one.
My package can now print to PDF (saving one step), but what I would like is to be able to print to PDF and attach to a new email (with the email address coming from the customer table) and possibly attach more than one PDF to a single email.
I know you can use
Code:
DoCmd.SendObject acReport, stDocName
to send a report but I would like it as a PDF as my formatiing is lost using that code and we normally send PDFs to our clients.
I have a large report that generates information specific to a large list of contacts. I would like to email each contact a .pdf of their part of the report. If possible, I'd like access to run a loop and do this in one button click. I'm not even sure to begin with this.
View 2 Replies View RelatedCan someone give me the code to send email via access form. Thanks
View 2 Replies View RelatedHi all,
I have e-mailed a database and when it arrives at the other end it is read only. I sent it in a zip file.
Using MS access 2003, emailing through a corporates firewall.
Any help would be much appriciated.
I've been working on a database for the last month or so. It's been a slow process since I've been learning Access and VBA in the process.
But my supervisor wanted a copy of it as a progress check to send to his boss. So I sent an email with a copy of the database as an attachment.
THe email went through, but when my supervisor tried to open said email, a dialogue came up saying that Access couldn't open the file because it was "out of the intranet or on an insecure site" or something along those lines
I was just wondering what this meant and how I would be able to send my boss a copy of the database so that it can be reviewed and such. Would this require splitting it?
Thanks in advance,
Nathan
Sorry to drag this forum back to the nursery school but.....
We have set up a database for recording manufacturing trials. The trial details (such as date, product, nature of trial, person responsible etc) are entered into a form. At present this form is then printed and distributed for authorisation and to inform people of the trial.
It would be much more convenient to be able to email the completed form to interested parties so they could review it in advance.
I have seen references to emailing tables etc from Access but do not know how it is done. Can someone explain it to me please in terms an idiot could understand!
Thanks in advance
I have a combobox named: Champion the control source is EmailChamptionID, based on SQL statement
SELECT tblChampions.EmailChamptionID, tblChampions.Champions, tblChampions.cemailaddress FROM tblChampions;
I want the user to be able to select the persons name from the box, which has an email name associated with it cemailaddress. When a command button is selected the person is supose to get emailed, but I keep getting a compile error "method or data member not found" .cemailaddress
the line is:
Private Sub cmdNotifyChampion_Click()
DoCmd.SendObject , , , Me.EmailChamptionID.cemailaddress, , , "TS16949 Non-Conformance #" & Me.Text19 & "", "hello", False, ""
I've also tried
Docmd.SendObject , , , Me.cemailaddress, etc
I guess I'm refering to the email address incorrecly, how would I write it?
I apologies for this thread, I was desperately attempting to avoid the need to post for help, especially as this is a much discussed subject. However, after three days of reading hundreds of threads and searching the web (not to mention winding the wife up) I am more confused than ever.
So, please bear with me, I have tried but everything I've attempted so far has failed.
My query centres around multiple e-mailing. I have a table from which a query runs. The query is called QryAddressBookEmail. The query will bring back anywhere from ten to thirty plus results, dependant upon the search parameters entered. From the query results I would like to e-mail each record. The email address is contained in the query field Email.
I'll be using Outlook Express for the emailing.
Rather than sending each e-mail separately I would prefer if they went as one, (IE Pete@..... , Joh@.... etc) thus avoiding the 'silent email warning - confirm to send' that appears to accompany each e-mail
For the subject and body of the e-mail, if possible, I would like two fields on the form that are populated by the user. These are named 'Subject' and 'Body'.
Again, if possible, the email is to be sent by clicking a command button.
So.. in theory, the user will select their search parameters which brings them back a list of hits. They then enter their subject line and the body of the e-mail directly onto the form and then hit the command button which will send a single e-mail to all those identified.
Also........ Whilst its not essential, anticipating future developments and other peoples wants, could an option be added for the user to attach a document by providing a path for it via a field on the form?
And..... if possible and time permits. Again, anticipating other peoples questions and problems, could an alternative be provided that e-mails each record seperately.
As you've probably already guessed, my VB is limited but I will give it my best shot.
Thanks in anticipation to anyone that can help. It is appreciated the time it takes to answer SFQ's from people like me.
I have a field within a table called E-Mail. I want to send a newsletter to everyone withing the DB. I have created some code which is as follows:
Private Sub testemailer_Click()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Set rsEmail = CurrentDb.OpenRecordset("QryStoresEmailticked")
While rsEmail.EOF = False
strEmail = rsEmail.Fields("E-mail").Value + ","
DoCmd.SendObject acSendNoObject, , , "jo.bloggs@k-n.com", , _
strEmail, _
"UK KNLogin NewsLetter", , True, ""
rsEmail.MoveNext
Wend
Set rsEmail = Nothing
End Sub
Now this works but it opens an individual email per email address into the BCC part. That a major problem if you have over 1000 contacts to send to. How do i get all my email addresses from my DB into the BCC of an email?
Any help would be much appreciated!
Hello, I am looking for some help on what appears to me to be a very large problem. Hopefully, to others, it's an easy fix. I have a very large database that has several details, of which one is email address.
My report is structure to group first on the email address, 2nd on the cost center, and third on the exeption. I am emailing the report to each individual email on the report. I can get it this far, what I can't get is for the email to only mail out each part of the report that is strictly for that particular email address.
I know this isn't very clear, but right now the entire report goes to each email address, I only want specific pages to go. The kicker to it all is that if I set specific parameters the first time, then I would have to set them every time, because the report varies in length each time it is pulled.
Please helppppppp! Thank You
I have set up a database that holds wedding list details for our shop. The product images are not held in the database itself - I have linked to them using VBA as outlined in the microsoft access help pages.
Now I can print a report absoluely fine, but I can't capture the report to send as an email to wedding guests. A snapshot isn't good enough as I don't want our customers having to download software. I thought maybe I could export the report to Word and then email that as an attachment. However, when I export the report, there are no images in the resulting Word document.
Does anyone have any ideas? I primarily need ease of use for the customers picking up the email at the other end.
Hope someone can help!
Hello gang!
I've read through many of the threads relating to sending Email from Access but can't seem to find quite what I'm looking for. I work as a Tutor Coordinator at a local college and I've set up Access to handle a lot of the day-to-day chores that our administrative assistant has to deal with.
One feature that would be absolutely wonderful would be to create and send Emails to students at the click of a button. I have several types of Email I'd like to be able to set up, but the one most needed (and probably most complex) is this:
Students come in to the office and request a tutor. If we have a tutor available, we assign them to an available tutor. If there is no tutor availabe, then every Friday we send out an Email to each individual student saying something like this:
"Dear John Doe - We currently do not have a tutor for MATH 101 at this time, but when one becomes available we will let you know... blah, blah, blah..."
I'd like to set it up so that the body of the message comes from a template - such as a text file (that is easily edited by a user) and populated with fields from a query.
Probably do something like this:
Query the Student_First_Name_field, Student_Last_Name_field, Department_Name_field, Course_Number_field, and Student_Email_field. Send an Email to each Email address pulled from the Student_Email_field and tell them the following - "Dear <first name, last name> we currently do not have a tutor for <department name, course number> at this time... blah, blah, blah..."
Currently the way the administrative assistant handles this is to send each student an Email individually - manually creating each Email with the specific data needed. As you can guess, this is quite time-consuming.
I'm rather new to Access but have been a RDMS programmer (in PICK) for several years. I know what it is I want to do, but don't know how to do it in Access.
Any help?
Would the best way be to use text files for templates?
Can text files be set up with field codes (Access recognizes "<LAST NAME>" to be Student_Master_Table.Last_Name_field)?
I'm guessing this will likely have to be a Visual Basic loop that works with data from a query.
Help? *grin*
I have a form that the user will fill, then email it to a customer.
I dont want to send the whole table, just the values that the user just inserted in the form.
Any idea on how should i do that using Access?
I am aware of the SendObject method, but i never used it, and dont know how. Any help will be very apreciated.
Thank you in advance.
I am using Access 2000, Windows XP and Groupwise 6.5. I am trying to email an employee leave report using the SendObject method. I would like to use the SnapShot format. Must I save the report before I send it? I tried acFormatSNP with no success. Thanks for all your help.
View 1 Replies View RelatedHi all i have a delemma
Im building a database that is required to send out a email once a week to selected parties informing them of what items will go out of date this week.
The main problem im trying to over come is the Automatic email.
Any help would be greatful
Mike
Hi all,
Access 2000
Wondering if there is anyway to setup a report to automatically run and e-mail out at a certain time each day? I currently have a button on a form, based on a macro, that when clicked, will e-mail the report to a certain user. Just wondering if there is anyway to set it to send at a certain time, without having to open the database and manually run it.
Thanks in advance.
J
We are a facility maintenance company that do a variety of jobs for many commercial companies with a several different trade groups we have (electrical, hvac, plumbing, painting, masonry, etc...) Our Trade Group Managers submit estimates and budgets for the jobs they are bidding to. I created a database to store all those jobs so we can track what manager has bid to any certain job, what trades are involved, if it has been accepted-rejected-in progress-and such. As of now the managers turn a written (paper) form into me to submit an estimating inquiry request and I put it in the database and print them out a receipt of all the information they submitted to me along with an Inquiry Number (which is the primary key in the database)-then that is how we keep track of that particular bid-with that unique Inquiry Number assigned to it.
Now we are wanting to be able to have this all electronically. So the managers can submit an inquiry request electronically and get a receipt back electronically-either by email or online or whatever. On the form they fill out there are several different trades that are able to be checked off. After they are finished filling out the form I would like for there to be a button at the bottom to email that form to all the checked off trades. How do I go about doing that?
..any suggestions would be greatly appreciated.
Thank you so much!!
Hello,
From the searches of this site Ive got it down and working to send an email with attachment via access. Thanks
The one thing I cant find is how to change the "From". I don't want these emails send via my name but my department. I usually just change the <From> to the department name in Outlook and send.
I cant seem to figure out how to make it work in access.
FYI: I did it via a module
With objMailItem
.To = "emails"
.Subject = "subject"
.Body = "text"
.Attachments.Add "C:file.xls", olByValue, 1, "department report"
.Save
.Send
needless to say .From does not work.
I am trying to automate the process of sending a query result via email.
I have code that will export a query as an excel document, using DoCmd.SendObject, but it has the name of the query.
DoCmd.SendObject acSendQuery, "Dailyrpt", acFormatXLSX, email.address, , , "Daily Report", "This is today's report", -1, False (email.address would actually be the email address it is being sent to.)
I also have code that will export the query to excel and save it as a file, using DoCmd.OutputTo, where I was able to name it something meaningful to the end user, and include the date.
DoCmd.OutputTo acOutputQuery, "Dailyrpt", acFormatXLSX, "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx"
Dim Foldername As String
Foldername = "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx"
Shell "C:Program Files (x86)Microsoft OfficeOffice14EXCEL.exe """ & Foldername & "", vbNormalFocus
Is there a way to either send the saved (renamed) file or to include the current date as part of the SendObject command?
I have a database with my staff in. If they are car drivers I take not of their Insurance and MOT renewal dates. I have built a query that gives me a reminder date ten days before and 5 days after the renewal. I also have an email function that emails my administrators the dates of these. Is there a way of getting the database to email specifically on those dates. I.e. a reminder 10 days before and a check 5 days after?
View 3 Replies View Related