Create Email From Access W/Information From Form or Query in

I have designed Databases for many years now, but never attempted this: 

I need to know how to create an email with information located in the active 
form or off of a query. I would like to have the email automatically 
generated with the To Address, The Subject Line and the Body of the Text. I 
would like that email to open but not to send until the operator has a chance 
to make modifications. (one record per email). 
-- 
Mark Matzke
0
Utf
2/19/2008 8:10:02 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
578 Views

Similar Articles

[PageSpeed] 14

"mmatzke@comcast.net" <mmatzkecomcastnet@discussions.microsoft.com> wrote in 
message news:F3F01720-2676-4DE6-A881-0E640CAF4CB5@microsoft.com...
>I have designed Databases for many years now, but never attempted this:
>
> I need to know how to create an email with information located in the 
> active
> form or off of a query. I would like to have the email automatically
> generated with the To Address, The Subject Line and the Body of the Text. 
> I
> would like that email to open but not to send until the operator has a 
> chance
> to make modifications. (one record per email).
> -- 
> Mark Matzke

Assuming you're using Outlook, do something like this:

' Declare Outlook variables
    Dim Outlook_Object As Object
    Dim Outlook_Message As Object
    Dim Message_Recipient As Object

' Create a connection to Outlook
    Set Outlook_Object = CreateObject("Outlook.Application")
    Set Outlook_Message = Outlook_Object.CreateItem(0)    ' 0 = Mail item
    Set Message_Recipient = Outlook_Message.Recipients.Add("put your 
recipient here")
    Message_Recipient.Type = olTo

' Body of the email. You can concatenate value from the current record or 
from a recordset
    Outlook_Message.Body = "put your text here"

' Subject line
    Outlook_Message.Subject = "put your subject here"

' Display the email window
    Outlook_Message.Display (True)


I've successfully used this method to send emails. I use late binding so 
that the version of Outlook doesn't matter; the only problem with this is 
that I don't get the benefits of Intellisense with the Outlook objects.

Carl Rapson


0
Carl
2/20/2008 2:27:15 PM
Reply:

Similar Artilces:

access 97 backend with 2000, 2002, and 2003 front ends
Is this possible to have the 97 users with 97 front end, 2000 users with 2000 front end, 2002 users with 2002 front end, and 2003 users with 2003 front end all linked up to an access 97 backend? We are currently planning on upgrading workstations with either 2000, 2002, 2003. the criteria for the specific version will depend on the IT department. I would like to know if we have several different office versions will it work to have access 97 as a back end?? thanks in advance jung That should work fine. Same rules as usual: make sure everyone has their own copy of the front end, preferably ...

multiple email addressess ?
how can we store multiple email addresses for one contact. i only see option for one add..? Hi, There are three email attributes in contact entity. emailaddress1 is by default added on form. If you want to also want to add other two than open customization form of contacts and add fields named emailaddress2 and emailaddress3. You can add more custome email fields also. You may contact me directly at my email address if you need any help on this. -- PLEASE do click on Yes or No button if this post was helpful or not for our feedback. uMar Khan Email for direct contact: imumar at gma...

Combo Box on Form
I have a combo box on my form created from the Combo Box wizard in design view. It worked great this morning. Now it has reverted to the old problems I had in the beginning. The combo box for some reason will pull and change existing records. I then went and cleared the table and now it won't let me input any information. I know there has to be a simple fix to this.... what am i doing wrong?? Do you have any code attached to the combo box events? Take a look at the event properties. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and th...

Spreadsheet with query statistics
I have a query in an Excel 2007 spreadsheet and set it to automatically refresh itself. I would like to have worksheet cells display information on the last refresh such as what time and date it was completed and how long it took to run. If this is possible can someone kindly explain how I can do this? Thanks in advance for your help, Jim ...

Create a distribution list from addresses in the 'To' list
Hi all, I belong to a social group, and our co-ordinator sends out an email from time to time with all the latest addresses in the To list. I already have a distribution list for the group, which then needs to be checked through and updated. Is there a simple way of transferring those addresses into my own distribution list? I'm using Outlook 2002. Everybody's fiddling around with bits of paper - I'll be a hero if I can make it easy for them! Thanks. Astley http://www.outlook-tips.net/archives/2004/20041105.htm -- Russ Valentine [MVP-Outlook] "Astley" <ast@...

Input Excel 'Password to Open' through control in access form
Hi All, We know,Excel has prompt password to open it files. Is it possible to create a code that can supplies the excel prompt password?.So that when we open the excel file through our access control in a form, the excel files can be opened automatically.But when the excel files opened from its default icon,it will prompt a password first. ...

Inserting form values into a table
We have a form with values taken from an sql query that comes from two different tables. We would like to enter the information into a third table. Can some one direct me to code that will do the following: 1. Provide the Insert sql that shows us how to add the form values to the table 2. Show us how to loop while inserting the information into the table (there could be several lines on the form, each must be inserted one at a time). I have worked with Access before and have never had a problem inserting information. However, I cannot quite figure out how to insert informtion through an ...

Compare records in a query then write equation??
Hi all, i have a problem and i need help, the case is as follows: the default rule is that i have 4 fields, (Date, Team, Score). each team is allowed to have one score per day but sometimes it can have 2 scores per day, when this is the case i wanna multiply each score by a certain number and have one score instead of 2 scores (similar to average but not average). So, i need to have a condition which compares records, and if this is the case, formulates this equation and gives me one score instead of 2 scores. Please help SELECT Team, [Date], Sum(Score)/Count(Score) * IIF(Count(Score) =1,1,S...

Excel not Access
I have designed an Access database that holds records relating to my stores audit results going back for about 5 years plus a load more information relating to these stores. This was used to produe a pack once a month, however a change in senior management means that I have got to shelve this and prodce a similar pack in Excel. The idea would be that the user could select a month or a 12 mnth date range that would produce data that could then be used to populate a number of excel templates that have been designed. Having not used excel for years I would be grateful for any suggestion...

Exchange 2003 new install can not receive external email.
I have just setup a new Windows Server 2003 standard edition with Exchange 2003 standard edition on it. I have been working for a while trying to get it to receive external email. I can send out and send/ receive internal messages, but when someone trys to send me a message from outside our network they get the following returned mail message This Message was undeliverable due to the following reason: Each of the following recipients was rejected by a remote mail server. The reasons given by the server are included to help you determine why each recipient was rejected. Recipient: <**...

Sony HDR-XR200V 120GB HDD High Definition Camcorder w/15x Optical Zoom
Price:$999.99 Image: http://specialdealfinder.info/image.php?id=B001QBM9EM Best deal: http://specialdealfinder.info/index.php?id=B001QBM9EM In my opinion, the camcorder deserves 4/5 stars. The HD picture quality outdoors (rain or shine) is PHENOMAL. I got a similar picture in SD. It wasn't quite as sharp as HD but still an EXCELLENT picture. The sound quality is amazing. I had no problem with wind noise when outside on windy days. The camcorder itself is lightweight and I found the menus and buttons to be user-friendly. I read several negative reviews on the included Sony softwa...

Strange Access Denied Problem with Windows 7
I got a new computer about six months ago that came with Windows Vista Home Premium 64bit. Before that I had done all of my .NET development either on an XP Pro VM or my former XP Pro computer at home. Shortly after getting my new computer at home, I also got a license for VMWare to be able to test my software on multiple platforms and configurations. I had wrote an application originally in VB.NET that was a simple backup utility. It supports mutiple backup configurations. Any given copnfiguration would define a backup which would be a list of files to backup, a list of folders to ...

How do I create several NEW templates from start to finish please?
Hi knowledgeable people. I am looking for instructions on how to create a range of basic templates that I can use, perhaps even by selecting them as 'stationery', for example; if I go to >New >Format >Apply stationery, or any other similar method. I can create new html stationery backgrounds, but this is NOT what I am looking for, as a lot of people still read email in plain text only...does this make sense? Plain text templates would be fine. I simply can't find any info on creating email templates anywhere to suit this Windows Live Mail Desktop versio...

hyperlinking email addresses
I have a list of email addresses that have hidden text before the first letter of the email address. I tried all the functionalities to get rid of this spacing/hidden text, but, it does not work. Now I am trying to hyperlink the email addresses, how do I do that? Most likely a non-breaking space...........char 160 CLEAN and TRIM will not pick it up. Try Edit>Replace What: Alt + 0160(on numpad) With: nothing Replace all. Gord Dibben MS Excel MVP On Sat, 9 Jan 2010 13:44:01 -0800, CharlesZ <CharlesZ@discussions.microsoft.com> wrote: >I have a ...

Outlook 2003
Hello, we have one client pc with Outlook 2003 where the following problem occurs: if a mail is replied from a user created sub folder of the inbox, the reply will not appear in sent mails, but will end up in the same sub folder, sender and recipient appear as identical. The mail goes out properly though, it's just that Outlook sets internally sender = recipient and bounces the reply back to the subfolder in which the original mail is stored. This happens on a Win 2000 machine with SP4 and all updates, the other clients use Outlook 2000 or XP and there is no such problem. There are no ru...

Radar chart in Access 2007 report
Can you add a Radar chart to an access 2207 report? ...

Filter recordset using query results
Hi all I have a form based on a query called [qry Quarterly Planning], it lists all Itineraries on the system. On this form you can filter records by specifying a Start and End Date for the [ReviewDate] and/or [Specialist]. It is a subform on a main unbound form, lets call this Subform1. Along side this I have another subform (Subform2) which displays ReviewDates that exist against an Itinerary. In other words Subform1 has a start date of an activity and if the activity lasts longer than 1 day, then the additional dates are stored in Subform2 (ItineraryDates). Currently when I...

Find prev record on other requeried form
Using access 2003. I have a main form for name and address info. A subform shows limited info on client placement. Click a command button on the main form and user opens another form for full screen entry of placement data. That form opens showing the client selected on the initial main form. When the full screen placement form closes, it requeries the original main form with the placement subform to show the added placement. It goes to the first record in the table though. It does not show the original client whose placement was just added. How do I set the mai...

adding name /creating field/query?
Hello, I can create an invoice_number field in a query using the primary field ID from the main table as invoice_number: ID but if ID say is 100, I cannot work out how to create renewal_invoice_100 Cheers Geoff Geoff We aren't there. We can't see what you're looking at. Where did "renewal_invoice_100" come from and what does it mean? Please post the SQL statement of the query you are trying to use. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://micro...

Creating new attributes
When using Schema Manager to create new attributes, I'm not able to create a new attribute with "Lookup" as type, "Lookup" is not availabe as one of the type options. But yet some of the exist fields, for example, in Account table came with "Lookup" as type. Why? Is there a work-around? Please help. Thanks. You cannot add custom lookup's to the current release of MSCRM. The only way around is to build a custom .aspx page and build your own. Might be possible in the next release. "HEC" wrote: > When using Schema Manager to crea...

HELP! remote data not accessible msg
Hello, I have a use who is currently using a Bloomberg DDE add- in. Whenever he attempts to activate the add-in to retreive remote data, the system hangs. If I go to task manager, I then see a message stating "Remote data not accessible. To access this data Excel needs to open another program.... I have searched the knowledge base and didn't find much help. Does anyone have any ideas? I am desperate!!!! We are currently using Excel 2003 in XP Professional. TIA, Ramissah ...

Calculating age in a label or text box on a form
Hello All, I have a text box for birthdate for a user to enter the birthdate and I want to the age for the user to be automatically calcuated and displayed in another label called "Age." What formula can I use? Missy ...

McAfee 8.5.0i on access scan slows down MS Dynamics CRM web client
Our organization's McAfee 8.50i slows down MS Dynamics CRM v4 - on premise web client considerabley when loading forms and data. Besides completely disabling McAfee, does anyone know how to configure McAfee (or configure CRM) to ignore CRM related form and data loads. When disabling the oncaccess scan, or when disabling the scriptcan - it improves lookups from 8-9 seconds to 4-5 seconds. However, the organizatin policy is to have these enabled. What to do? We have the same behavior, and went we reported to Microsoft says that no solution has, then we buy and install Microsoft Securi...

Email Router Failing with System.UriFormatException: Invalid URI:
I cannot seem to get a handle on this, even with a very basic email workflow rule. The rule is simply to watch test@mydomain.com. If any email goes in, send a notification email to user@mydomain.com The Server has the following error. Anyone have any ideas? Event Type: Error Event Source: MSCRMExRouterService Event Category: None Event ID: 0 Date: 1/21/2007 Time: 4:01:50 PM User: N/A Computer: IAHSR0002 Description: System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.Parse() at System.Uri..ctor(String uriString, Boolean dontEscape) at Sy...

Incoming email slow to come in
Don't know if anyone can help, but here goes. We are running an Exchange 5.5 server and I am running Outlook 2003. Email that is sent to me internally is very slow to arrive (up to 30-45 seconds), including email I send to myself. Nobody else in my immediate vicinity is having the same issue, their email arrival is instant. We have reviewed Outlook settings and they are identical. One strange thing is this: If I send myself an email, don't do anything, it will come in within 30-45 seconds. However, if I send myself an email, then immediately send another email both of them will ...