473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically send email using DoCmd.SendObjec t

iBasho
16 New Member
Hi,
I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObjec t command without actually sending any database objects.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command107_Click()
  2. On Error GoTo Err_Command107_Click
  3.  
  4. DoCmd.SendObject acSendNoObject, , , "email@email.com", , , "Test", "Email Test", , True     
  5.  
  6. Exit_Command107_Click:
  7.     Exit Sub
  8.  
  9. Err_Command107_Click:
  10.     MsgBox Err.Description
  11.     Resume Exit_Command107_Click
  12.  
  13. End Sub
I don't want the users to have to actually click on the "Send" button of the email that pops out on the screen. Is there any way to modify this code, or use other code so that the email window doesn't pop up, but the email is sent automatically without the user seeing it.

Thanks.
i.b.
Jul 29 '08 #1
2 9861
nspader
78 New Member
Should be set to FALSE....The last statement. That will auto send without asking for changes.
Jul 29 '08 #2
iBasho
16 New Member
I had it set to False and the email window still popped up and you had to press enter for the email to be sent.
Jul 29 '08 #3

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

Similar topics

1
2410
by: Cameron | last post by:
Hi, I've attempted to make use of the Microsoft Knowledge Base Article "ACC97: How to Use a Recordset to Send Outlook E-Mail to Multiple Recipients - 318881" but I can't get it to completely work. I have been continually receiving two error messages. The first message states that it cannot find the Form "frmMail" which I made sure to create.
0
1885
by: cronept | last post by:
Hi, there, I have a form with 2 email buttons both with docmd.sendobject code. The 1st one send a report which is working properly. The 2nd one send a query in xls format which is always get an error message say" .... can't save the output data to the file you selected." I am very confused. it used to work properly. And now, sometimes it works, most time it doesn't work. I am using ACC2000, outlook express and Win XP. below are the 2...
11
5036
by: Tim Smallwood | last post by:
Hi, I have an Access project that I use to allow a client to hit an SQL server at my host. This project has several forms that are used to udpate tables, etc, but I'd also like to be able to include the ability to allow my client to send an email to everyone that has subscribed to our web site by going to the table that contains the names and email addy's and then loop thru the same and send an email to them all by appending their...
5
2248
by: Mark | last post by:
Hi All, Is there a way to (whilst using the sendobject command) use a query as the source of email addresses. I ask this because the list is constanly changing and I don't want to keep going into the code to change the list? I am very new to programming and though that I could declare the SQL statement but that has not worked. Could anyone offer any direction to find the best way to do this if indeed it can be? The code I am trying to...
4
3862
by: Ranganath Udupa | last post by:
I need to include a mail to a concerned person whenever a button is clicked in an Access form. So I used the DoCmd.SendObject command. However, it seems like I cannot send a long message text. Is is true? What is the limitation on the size of the message text field? Of course, an option is to send my long text as an attachment. This will not be viable for me since our mail server blocks all attachments. Any ideas? Thanks, Ranganath
17
8798
by: DP | last post by:
hi, is there a way to send an e-mail to a customer, using ms access?? or some kind of automated mail merge, so the user only has to review the body, and click send? ive got a customer table, with a field called email address, where the customer can have an e mail address. is there a way to make access create one, using outlook express, or anything
1
2910
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 query: What I currently have is a setup which is pretty much identical to this (on a standalone access database, not network oriented, single user): =====================================
1
3866
RobH
by: RobH | last post by:
i currently send a report to a reciepient using the Docmd.Sendobject acSendReport which works really well - now my customer wants two reports sent in the same email.. Any thoughts???
3
6637
by: phill86 | last post by:
Hi I am using the following code to send an email from access via outlook automatically DoCmd.SendObject acSendReport, stDocName, acFormatRTF, "User", , , , , False
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.