473,508 Members | 2,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DAPs - Create a command button that will send an email through default mail client

beacon
579 Contributor
I have a DAP that I've added a command button to (and by default is set to be coded using vbscript, but I'll use whatever works). The command button uses the onclick method to look at a dropdown list, see if there's anything in it, and return a message as output to the monitor.

This part works great. My main goal, however, is to get the script, once it's displayed the message on the screen, to open the default email client and start an email message. Kind of like the mailto: tag will do...

Here's what I have so far:
Expand|Select|Wrap|Line Numbers
  1. <script language=vbscript event=onclick for=command1>
  2.  
  3. if dropdownlist0.value = "" then
  4.   msgbox "Please select an instructor"
  5. else if dropdownlist0.value = "Instructor 1" then
  6.   msgbox "You selected Instructor 1"
  7. elseif dropdownlist0.value = "Instructor 2" then
  8.   msgbox "You selected Instructor 2"
  9. end if
  10.  
  11. </script>
  12.  
Ultimately, I'm trying to create a quiz that will email your scores to the instructor that you chose from the dropdown list once you click on submit.

We use Microsoft Outlook on the Exchange Server at my work.
Aug 20 '08 #1
2 1708
risk32
98 New Member
Beacon,
I'm doing a little research on this matter to help you out, but here's for starters...
You're going to have to open Outlook to send an email, no question about that.
Here's a way to do it (this part would go in your command button portion)
Example Default Location:
Expand|Select|Wrap|Line Numbers
  1. Shell ("C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE")
  2.  
Of course, this is only to open the program itself. Creating a new message with subject / body insertions is a little more tricky. I'll have more info ASAP.

Regards,
Adam
Nov 3 '08 #2
risk32
98 New Member
Here's something I came across for email using Access VBA... Might want to give a look at it.

http://www.everythingaccess.com/tuto...curity-Warning
Nov 3 '08 #3

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

Similar topics

2
476
by: Jack | last post by:
Hello, I have a web-based application, located on the Internet, and I'd like to use a command button like a hyperlink. Ideally, I'd like to have the users default mail client be initiated with...
3
3481
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
2
10664
by: Landley | last post by:
Hello, Is there a way of creating an email, attaching a file and sending using the client's default mail client? I am looking for a none email client specific solution that does not involve...
24
1697
by: Lauren Wilson | last post by:
OK, I'm confused. SOME folks here seem to be saying it IS possible to link to or otherwise access and manipulate MDB files stored on a web server (from the client) and others seem to be saying...
5
2571
by: Alain | last post by:
Hi, I am trying to figure out why I get the following error when I try to send a mail from an ASP.NET (1.1) application. When I use the same code from a Windows exe then the code works...
16
4698
by: =?Utf-8?B?Q2hlZg==?= | last post by:
I can use outlook2003 to send email,but I cann't use this code below to send email. Please help me to test this code and instruct me how to solve this problem in detail. software...
7
3461
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
4
3001
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface elements in addition to some information associated with...
7
16872
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on...
0
7225
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,...
0
7326
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,...
0
7383
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...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
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...
0
3194
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...
0
1557
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 ...
1
766
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.