I have two question on sending email messages from MS Access (Versio
2000, 2002, and 2003). I have a form with a command button to send an
email message, the code behide the button is as follows;
=============== =============== =============== =============== =============== ==
Dim strRecipient As String
Dim strSubject As String
Dim strMessageBody As String
strRecipient = "em**********@d omain.com"
strSubject = "A New Vendor PO Has Been Entered, PO Number " &
Me![PO_Nbr]
strMessageBody = "This is to notify you that a new Vendor PO has
been entered." & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "PO Number " &
Me![PO_Nbr] & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "This Email has been
generated from the Vendor Repair PO Database, Please DO NOT reply."
DoCmd.SendObjec t acSendNoObject, , , strRecipient, , , strSubject,
strMessageBody, False
=============== =============== =============== =============== =============== ===
This code work fine but I would like to expand it in two ways.
First:
The way this code sits now I have to hard code the email address, or
leave
it blank and let the user enter the email address. I don't want to do
either. I want to be able to pull the email address from a table. The
email address would be linked by the "BuyCode" field. The table has
the foloowing columns "BuyerCode" , "BuyerName" , "BuyerEmail " the
form hase a field called "Buyer" which is populated via a drop down by
the user. I want to be able to take the Buyer from the form link it
back to the table, pull the email address for that buyer and insert it
in the code above.
Second:
This database is used to alter the warehouse when a new Vendor Repair
Purchase Order has been entered into our main frame system. The code
above works fine if the Buyer is entering just one Vendor Repair PO.
There are time when a buyer may enter multiple Vendor Repair POs in
the same day. Rather than have the buyer enter each PO then email it
to the warehouse, I have created a form where the buyer can enter any
number of POs. What I would also like to do with the above code is
have is pull all the PO numbers on the "Multi Vendor PO" form and
insert them into the email body. The number of POs could range from 2
to 50 or more.
Thanks in advance for any input on either of these areas.
Regards,
Del 2 2091 dt****@yahoo.co m (Del) wrote in message news:<c2******* *************** ****@posting.go ogle.com>... I have two question on sending email messages from MS Access (Versio 2000, 2002, and 2003). I have a form with a command button to send an email message, the code behide the button is as follows; =============== =============== =============== =============== =============== ==
Dim strRecipient As String Dim strSubject As String Dim strMessageBody As String
strRecipient = "em**********@d omain.com" strSubject = "A New Vendor PO Has Been Entered, PO Number " & Me![PO_Nbr] strMessageBody = "This is to notify you that a new Vendor PO has been entered." & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "PO Number " & Me![PO_Nbr] & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "This Email has been generated from the Vendor Repair PO Database, Please DO NOT reply."
DoCmd.SendObjec t acSendNoObject, , , strRecipient, , , strSubject, strMessageBody, False
=============== =============== =============== =============== =============== === This code work fine but I would like to expand it in two ways.
First:
The way this code sits now I have to hard code the email address, or leave it blank and let the user enter the email address. I don't want to do either. I want to be able to pull the email address from a table. The email address would be linked by the "BuyCode" field. The table has the foloowing columns "BuyerCode" , "BuyerName" , "BuyerEmail " the form hase a field called "Buyer" which is populated via a drop down by the user. I want to be able to take the Buyer from the form link it back to the table, pull the email address for that buyer and insert it in the code above.
you could use DLookup to grab the e-mail address, or you could include
the e-mail address in the controlsource of your dropdown, and then
just reference the given column... something like
Me.cboBuyer.Col umns(n)
where n is the (n-1)th column... (Column collections(?) are
zero-based) And just use that as your recipient address...
> Second: This database is used to alter the warehouse when a new Vendor Repair Purchase Order has been entered into our main frame system. The code above works fine if the Buyer is entering just one Vendor Repair PO. There are time when a buyer may enter multiple Vendor Repair POs in the same day. Rather than have the buyer enter each PO then email it to the warehouse, I have created a form where the buyer can enter any number of POs. What I would also like to do with the above code is have is pull all the PO numbers on the "Multi Vendor PO" form and insert them into the email body. The number of POs could range from 2 to 50 or more.
Thanks in advance for any input on either of these areas.
Regards, Del
use a query to return all the values you want, then loop through them,
concatentating what you want... see www.mvps.org/accessweb Look for
fConcatChild I think that's what you want. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sven Templin |
last post by:
Hello all,
our configuration is as following described:
- OS: Windows 2000
- Apache server 1.3
- Php 3.8
- MS outlook client 2000
_and_ no SMTP server available in the whole intranet.
|
by: Deborah V. Gardner |
last post by:
I am trying to send email from Access 2000 using Eudora. The MAPI option
is set in Eudora to always be the MAPI server.
When I use the Send option on the File menu I receive an message
"Microsoft Access can't open the mail session. Check your email
application to make sure that it's working properly."
I tried duplicating the problem on another computer and was unable to.
The message did not appear and the email was sent.
|
by: Devonish |
last post by:
I am composing an email with Access VB and then sending it from within
Access.
Everything works correctly (the email actually goes!) but Outlook ask
some
irritating questions that the user is required to answer. A summary of
the
relevant code is:
Dim mailObj as Outlook.MailItem
|
by: WindAndWaves |
last post by:
Hi Gurus
I am trying to send a newsletter from Access. Can anyone tell me what is
the simplest way to send an email from Access? I would prefer not to use
outlook, because this gives me all these security warnings and besides, I
would prefer not to look outlook at all, so that people with Access RT could
also use my code.
Is there a way to send an email from DOS perhaps?
|
by: kimberly.shaffer |
last post by:
Okay, I can automate sending of multiple emails with records using
Groupwise and Access DB. But now what I need to do is send multiple
fields associated with one field out automatically and can't figure out
how to do it.
For instance, my records look like this:
strEmail strGroup
jjohns@comcast.net catlovers
jjohns@comcast.net doglovers
| |
by: Dragos Marian Barbu |
last post by:
Recently I tried to develop a function to help me sending e-mail messages
with more than one attachment. Everything is working OK when I am sebding
messages with one attachment, but when I try to send more than one file as
attachment I get the following error:
-------- Error -----------------
Could not access 'CDO.Message' object.
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object args) at...
|
by: gemma.gill |
last post by:
Hi There,
I have a button on a form within access that sends a verification e-
mail. My problem is that these e-mails are sending from individual
user accounts rather than a genieric mailbox.
Is there a way to do this?
We are using MS Outlook each user has an account set up that gives
them a personal mailbox and access to another mailbox "helpdesk". I
|
by: robbiesmith79 |
last post by:
Just so this is out there on the web, I battled the past 24 hours
about this. Background info... I developed a ecommerce website in PHP
4 on a shared linux hosting plan from GoDaddy and had the html
formatted emails sending as text/html and were going fine with limited
header information. Then we moved the site over to a Dedicated Linux
hosting plan. This time, it's PHP 5. Things are bound to not work as
expected moving to a new...
|
by: jackb |
last post by:
Hi there.
Is there any solution such that I could connect to some TAPI access number using TAPI in .NET, and then could send messages?
E.g. consider SprintPCS; I could send message to any number by sending email to <number>@messaging.sprintpcs.com but this method ends up with some messages not delivered or delivered incomplete. Thats why I want to use TAPI to send messages.
Quick help will be appreciated!
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |