General :: Program Crashes When Sending Email In Response To Click On Send Button

Nov 9, 2012

I am sending an email using SendObject. Sometimes it works, and sometimes it makes the computer freeze up with no error message. I have tried this with Outlook running or not running, seems to make no difference.

Code:

'The sub procedure below sends e-mail in response to a click on the Send button.
Private Sub SendMessagesButton_Click()

'For Access, define some object variables and make connections.
Dim myConnection As ADODB.Connection
Set myConnection = CurrentProject.Connection
Dim myRecordSet As New ADODB.Recordset
myRecordSet.ActiveConnection = myConnection

[Code] ....

I have added some MsgBox () to narrow down where it crashes. It is after 'Five' and Before 'Six'. On the line:

Set appOutlookRecip = .Recipients.Add(eMailAddress)

I am mystified as to why it works OK sometimes, and not others. The email address being used is valid.

View Replies


ADVERTISEMENT

General :: Sending Text Via Command Button To Email

Mar 19, 2014

After inputting data into a text box on a form i want to click on a command button which will open an email program and then put the text there so i can send it.

View 1 Replies View Related

Modules & VBA :: Email Response - Reply To From A Button

Feb 24, 2014

I have a DB that holds multiple possible email responses, originally set up for just straight up create email based on this information. the Button to created the email works great. Now what I would like to be able to do is Click a 2nd button that instead of creating a new email, it would open a reply to the current opened email. I would still want to push the information to it like it does in the current new email button.

View 1 Replies View Related

Forms :: Command Button On Click Function - Search By Hedging Program

Jun 26, 2014

I have a command button using this code:

If Me.Setfilter.Caption = "Search By Hedging Program" Then
Me.Filter = "Hedging Program"
Me.FilterOn = True
cmd.Setfilter.Caption = "Don't Search By Hedge Program"
Else
Me.FilterOn = False
cmd.Setfilter.Caption = "Search By Hedging Program"
End If

Hedging program is the column from the table I am trying to filter, it is a yes/no column. I want it to return all yes values in my query if it says search by hedging program and if it says Don't search by hedging program I want it to disregard the filter. I also have it set so that when I click the button it changes the caption from one to the other. So I don't know if I really need the cmd.setfilter lines because they may do the same as my command button on click function.

View 14 Replies View Related

General :: How To Send A Single Email Message To All The Email Addresses In Query

Jun 2, 2014

I have a query (Access 2007) that contains a field named "email" (which contains email addresses, of course). I want to email everyone in the query and they are all going to receive the same message. My email to them doesn't have to be personalized and I don't need to collect data from the recipients. I don't even need a reply to the email I send.

View 12 Replies View Related

General :: Send A Specific Email From Outlook To All Email Addresses Within A Query

Jan 21, 2014

I have a database that I can use to create a query, grouping companies by city. I then want to send a specific email I have created in outlook to all of the email addresses in the query.I do not need to include names.

View 6 Replies View Related

Creating Button To Send Email

Jan 2, 2008

I would like to create a database that would enable me to select various options (from dropdown lists) which I could then have tidily arranged in an email that would automatically be sent to the recipient.
Before I attempt to design the facing page I'd like to know if this is an option in Access?

View 2 Replies View Related

Create Command Button On Form To Send Email

Oct 26, 2004

I have created a form and housed in the form is a combo box that pulls info from managers I work with. I want to create a command button that I can click to send them an email. I have their information tabled and then have also converted that table into a form. I have their email address I just need to know how to properly code the command. I have no visual basic experience. I have had classes where I've coded in C++ and HTML but very limited.

Thanks

View 6 Replies View Related

General :: Sending Email Through Outlook?

Oct 18, 2013

with the linking tables thing to outlook can it be reversed. ie if i have a table that was linked to outlook outbox would the records form an email just like the emails from my inbox form a record.

i wanting to send emails automatically to many recipients. so i would have to use a record set and i thought that if i build the email in a record then have outlook pick it up then that would be the easiest way.

View 2 Replies View Related

General :: Access 2003 Is Not Sending Email?

Feb 3, 2015

Our database is in access 2003. It has a form which has a button to send email of orders. I added a new user in this database. That button works in all other computers in the network with the same user permissions as this user, in his computer when he select to email Order it does nothing. It does not open the new email page in outlook and the outlook email is configured in his computer.

View 3 Replies View Related

General :: Sending Email With SendObject - How To Determine User Name

Apr 27, 2015

When I send an email from Access with SendObject, how does it determine the user name, the 'from' name. Is it just the user's Outlook name? Do I have any control over that?

View 1 Replies View Related

General :: Auto Sending Email With Wrong User ID

Jan 21, 2013

have a vba code written to have my MS Access 2007 tell Outlook to send an e-mail with several attachments to whom it may concern, but I need it to change the "From" field in the e-mail, because there's many people who can send this, but it's looking like it's all being sent as my user. This is the code, it all works, but it doesn't change the sender field. Should I make some sort of auto-login macro or something?

Call fctnOutlook("Reconsideraciones BCH", EmailTasador, Email, , Subjet, "Agradecer revisar la tasacin indicada, de acuerdo a lo pedido en email adjunto, y me des tu opinin. " & vbCrLf & vbCrLf & "Favor no responder a Reconsideraciones BCH, no recibe correos es solo para enos, enviar a visador indicado en el email" & vbCrLf & vbCrLf & "Le saluda atte." & vbCrLf & vbCrLf & usu & vbCrLf & "Seccin Tasaciones" & vbCrLf & "Banco de Chile" & vbCrLf & vbCrLf & vbCrLf, Nz(Tpath), "Yes;No;Maybe", 2, True)

With objMail
.To = EmailTasador
.CC = Email
.Subject = Subjet
.Attachments.Add (Tpath)

[code]....

View 2 Replies View Related

General :: Get Database To Send Email?

Jun 11, 2015

I need a form that will send a email to certain contacts depending on which box is ticked

Have never done this previously would this be possible

View 2 Replies View Related

General :: Opening Email To Send

Nov 7, 2012

I found the code below online and added it to a process I already use. It works great for what I need to do right now. The code opens the email with the email address, the file attached, and a message in the body. The only thing that is missing is the subject line, which is the month of the report.

It is a monthly report sent via a text file to another group. The form that I send this from has a table as the Control Source. The month is in that table. I can put it on the form and hide it so that it can be accessed. How to add that below so that the month would show up in the Subject Line of the email?

START OF CODE

Dim objOutl
Set objOutl = CreateObject("Outlook.Application")
Set objMailItem = objOutl.CreateItem(olMailItem)
'comment the next line if you do not want to see the outlook window
objMailItem.Display

[Code] ....

View 6 Replies View Related

General :: Send Email And Put Notification That One Has Been Sent

Apr 17, 2014

I have a marco that sends a report to other users, is it possible to stop the same report being sent twice to the same person . the user who sends the report is prompted for a number for that specific report...

View 2 Replies View Related

General :: Sending Form Through Email And Processing Responses - Access 2010

Oct 16, 2012

I'm working on a vacation/time off tracker and was hoping to use the collect data feature. I've created a form where a user submits their requested date and number of hours, at which point I'd like the form to be sent to their manager for approval. The manager's email address is stored in a table. Once the manager marks yes or no, I'd like that reflected in the time off requests table, and an email sent to the requester letting them know if it was approved or not. Is this possible? How would I go about it. I'm pretty new to Access, learning on the fly, but I'm pretty good at modifying code to match my situation/working backwards if you have any examples for me to look at.

View 1 Replies View Related

General :: Send Email Based On Query?

Apr 23, 2013

I have an access database that sends one e-mail to each individual in a table, that works fine. Now I would like to send an e-mail to the leaders of these individuals, however, some leaders have more than individual under their scope so to avoid sending several emails, I would like to know if there is any way I can send one e-mail to the person with the names of the individuals he leads in the body of the e-mail. This is the code I have that sends emails to the individuals:

Code:
Private Sub Command2_Click()
Dim MyDB As Database
Dim MyRS As Recordset

[Code]....

View 7 Replies View Related

General :: Grouping Data To Send To Email

Jul 11, 2012

i have a filter that shows the bookings for the weekend, which i can click on each act and it generates an email for then to confirm. however some acts have more than one booking on that weekend and i want to be able to list the bookings in one email, the email script i use at the moment is below, the acts can be grouped by a field called grouped

Code:
Private Sub artist_DblClick(Cancel As Integer)
Dim msgTxt As Variant
Dim objOutlook As Outlook.Application
Dim objMailItem As Outlook.MailItem

[code]....

View 1 Replies View Related

General :: Send Email From Microsoft Access

Jun 18, 2015

Ive recently developed in Emailing from Microsoft Access. When I was researching email methods from Access a thought occurred to me that there should be an A.P.I. that would do this the easy way.All of them did have a web A.P.I. which was all I needed to translate a web request from the other language examples given.

Code:
Dim reportName As String
Dim path As String
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
Dim strAttachments As String
Dim strTransPort As String
Dim byteData() As Byte

[code]....

View 5 Replies View Related

Modules & VBA :: Query Records By Current Date Then Email Results On Button Click

Feb 26, 2014

I am trying to query my records by the current records selected date then send the results in the body of an email on click. I believe I am close but I think there is a problem with the date format because I am getting 3421 Data type conversion error. Here is what I have:

Code:

Private Sub eMail_Click()
On Error GoTo EH
Dim dbExceptions As Database
Dim rstExceptions As Recordset
Dim dbDate As Database
Dim rstDate As Recordset

[code]...

View 3 Replies View Related

General :: Send Email 7 Days Before Actual Date

Aug 30, 2013

How can I make that my access send an email to a user if there 7 days until en employee's birthday.

View 5 Replies View Related

Modules & VBA :: Word Document Load When User Click Button And Perform Email Merge

Oct 7, 2013

I have a Word 2010 document linked to an Access 2010 data source. When a user clicks a button in Access, the Word document loads and performs a email merge using the below VBA code:

Private Sub Document_Open()
With ActiveDocument.MailMerge
.Destination = wdSendToEmail
.SuppressBlankLines = True

[Code] ....

However, as the .mailsubject part is not in the loop it is only retrieving the first Return Code. I have tried to integrate in the loop to no avail. Also, how do I add static text to the Subject, I need something like "Your Return Code" + "Return Code"..

View 6 Replies View Related

General :: Send Email Attachment Using Form Data Using Automation

Jun 20, 2013

I am currently using SendObj method to send an Outlook email and selected report as an attachment using the current form's data. This is triggered by a button click.

This is working well apart from having to use 'ClickYes' to outwit the Outlook 2012 security system.

However I now need to selectively send an extra pdf file with some of the emails based on a Yes/No field on the form. This is a fixed file on my local C drive.

I think I have to use automation to do that but I can't find a method of specifying the report I currently use in the SendObj method in the .Add.Attachment line.

Do I need to run the report and then save it so that I can specify the path and name in the .Add.attachment line followed by code which will delete the file? or is there a means of combining the code I currently use in SendObj to create the pdf object with automation option?

I have working code for both attachments at present but they send separate emails and I would prefer to combine them if possible.

View 3 Replies View Related

Button For Sending A Specific Row Of Information To A Specific Email Address?

Oct 8, 2015

I am trying to figure out how to make a button that sends an email to a specific email address, containing the information from 1 row.

we have rows where we put the the address, the quantity and the time interval we can collect the packages in. these information have to be send to a trucking company. I want access to send an email to the trucking company's email address, and not a whole report of all the rows, but be able to choose to send row 1,2,3 etc.

View 1 Replies View Related

General :: Send Email To Individual Clients Via Access Database 2003

Sep 17, 2014

I have a requirement to send a email to individual clients via my access database 2003 . I am using the email address of the client in the current open form . I then created a query using the id to filter that particular client, this query then becomes my record set.The content for the email is held in a .txt file , On my c drive . Every things appears fine however the fonts that I select in the .txt file are not being use in the actual email body. I created a word document with my preferred fonts and copied and pasted them into the .txt file but on sending the email the selected fonts do not appear.

I have attached a demo of what I am trying to do . To test enter your own email in the email address field of the form . Note the .txt file is on the C:/ drive.

View 4 Replies View Related

General :: Using Access 2010 To Send Bulk Email Each With A Unique PDF Attachment?

Feb 12, 2013

I would like to automate the current process of sending an e-mail with a PDF attachment that is unique to each recipient; it is their test results. I'm sending an e-mail one at a time (which was fine when the number of folks being tested was small, but now I'm up to approximately 200 e-mails and growing each year)

System Environment:

Windows 7 SP1 (64 bit)
Office 2010 Professional

Access environment and Process:

1. A qry object/letter is built based on 4 tables (test results, result averages, a global employee list and location)

2. The Report has both static and dynamic text. Examples include: "Dear" [qry-Letter. F_name] and Address Information

a. =[qry-Letters.F_Name] & " " & [qry-Letters.L_Name]
b. =[qry-Letters.Position]
c. ="Dept " & Right([qry-Letters.Dept],3) & ", " & [qry-Letters.City]

3. The report also includes the employee's results, the session averages (testing is conducted at multiple locations each occurrence is a session) and companywide averages.

4. Report Process: Run the report, entering primary key Emp_ID, report is populated saved (overwritten with the next Emp_ID and printed as a saved PDF.

5. MS Outlook: create a new e-mail, text body is common to all e-mails e.g. "attached are your test results" the PDF is attached and the e-mail sent to the recipient (the e-mail address follows the corporate standard, =Trim([qry-Letters.F_Name] & "." & [qry-Letters.L_Name] & "@abc.com")

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved