473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How can I display a control value in email subject sent from Access

I've got the following code on the "OnClick" event for a command
button on a form.
______________________________________
Private Sub EmailNotify_Click()

DoCmd.SendObject acSendNoObject, , , "us**@company.com", CCFIELD,
BCCFIELD, [LogID], BODY_HERE, False

End Sub
______________________________________

It works great, but what I want it to do is include the words "New
Order Entered: Log # " before the [LogID] value in the email subject
line. What do I need to do to make it accept that? I can enter the
phrase, but then the [LogID] doesn't display when in quotes, and
causes a failure of the code if it is outside the quotes.

I'm sure this is simple and obvious, but I'm not having any luck. Any
help is greatly appreciated.

RJB

Feb 9 '07 #1
2 1577
gweasel wrote:
I've got the following code on the "OnClick" event for a command
button on a form.
______________________________________
Private Sub EmailNotify_Click()

DoCmd.SendObject acSendNoObject, , , "us**@company.com", CCFIELD,
BCCFIELD, [LogID], BODY_HERE, False

End Sub
______________________________________

It works great, but what I want it to do is include the words "New
Order Entered: Log # " before the [LogID] value in the email subject
line. What do I need to do to make it accept that? I can enter the
phrase, but then the [LogID] doesn't display when in quotes, and
causes a failure of the code if it is outside the quotes.

I'm sure this is simple and obvious, but I'm not having any luck. Any
help is greatly appreciated.

RJB
DoCmd.SendObject acSendNoObject, , , "us**@company.com", CCFIELD,
BCCFIELD, "New Order Entered: Log # " & [LogID], BODY_HERE, False
Feb 9 '07 #2
Thanks - works great. I knew it was something simple...darn
ampersands.

On Feb 9, 12:17 pm, salad <o...@vinegar.comwrote:
gweasel wrote:
I've got the following code on the "OnClick" event for a command
button on a form.
______________________________________
Private Sub EmailNotify_Click()
DoCmd.SendObject acSendNoObject, , , "u...@company.com", CCFIELD,
BCCFIELD, [LogID], BODY_HERE, False
End Sub
______________________________________
It works great, but what I want it to do is include the words "New
Order Entered: Log # " before the [LogID] value in the email subject
line. What do I need to do to make it accept that? I can enter the
phrase, but then the [LogID] doesn't display when in quotes, and
causes a failure of the code if it is outside the quotes.
I'm sure this is simple and obvious, but I'm not having any luck. Any
help is greatly appreciated.
RJB

DoCmd.SendObject acSendNoObject, , , "u...@company.com", CCFIELD,
BCCFIELD, "New Order Entered: Log # " & [LogID], BODY_HERE, False

Feb 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
3
by: Marauderz | last post by:
Hello guys, got a little question regarding the regional language settings . Anyway I got a Windows 2003 Server machine that was installed with the date format "dd/MM/yyyy" and location still...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
1
by: Evan Kontos | last post by:
I have the need to test for the value of a client variable from a server control in a VB Web form. How can I do this in VB. Net? Evan Kontos | EKontos@comtekcadd.com 27 Whitehall St. | ...
4
by: rszebras | last post by:
I inherited a database (as a novice at Access) and need to modify it to make it more efficient, i.e., the assignment form needs to autopopulate with the client's name, address, phone number, etc.,...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net app, in the page there is a scan activex which could scan and save a jpg file in client harddisk. How could we access and display this jpg file on the fly using js in the client...
3
by: Allen Chen [MSFT] | last post by:
Hi Richard, Quote from Richard================================================== However I also want to be able to remove the panes. I have tried to include this, but find that when I first...
14
by: confusedfusion | last post by:
Not sure how many form submissions that have been lost over the years before I started but the company has a contact form that the required fields when validation fails the error message is going...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.