473,513 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically send email using DoCmd.SendObject

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.SendObject 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 9824
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
2396
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...
0
1878
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...
11
5015
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...
5
2237
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...
4
3849
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...
17
8777
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,...
1
2899
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...
1
3845
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
6619
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
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
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...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7128
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...
1
5103
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...
0
4759
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...
0
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.