473,505 Members | 14,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use SendObject Property to email designated person who is listed in a table

I have a form where I select a business and I need to send a report to
a person who is tied to that business in one of my tables. How can I
use a command button that is tied to a macro to Send a report to the
specified person?

Mar 30 '06 #1
1 1262
In the lower pane of the macro design window, try using DLookup() in the To
argument.

For example, if the email address is found in MyEmailField in Table1, where
the ID is 99, use:
DLookup("MyEmailField", "Table1", "ID=99")

That works with SendObject in code. I'm not sure if it works in the macro.

If you need help with DLookup(), see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ky*************@gmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
I have a form where I select a business and I need to send a report to
a person who is tied to that business in one of my tables. How can I
use a command button that is tied to a macro to Send a report to the
specified person?

Mar 31 '06 #2

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

Similar topics

88
12319
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
7037
by: alessia | last post by:
Hi, i'm sorry for my bad english but ..i'm italian.. I have a big problem that I don't succeed in resolving on the command sendobjet. I have a query that as resulted a list of addresses e-mail it...
0
2340
by: Bret Shortall | last post by:
Using the SENDOBJECT action command in a Macro works fine if you hard code in their email address. SENDOBJECT TO bret@emailaddress.com SUBJECT This is the Subject line...
4
2183
by: Richard Cleaveland | last post by:
We have an Access 97 application which uses the DoCmd.SendObject method to send emails when a command button is activated. Our standard email client is Eudora. On all but one machine we have no...
1
3882
by: jerry.ranch | last post by:
I collect information from my clients with an xls file I import the xls data into my access table. I don't have them put info directly into Access, because, despite the drop downs I have for...
4
8806
by: dszmauz | last post by:
I'd like to send a report to a distribution of email addresses. The distribution list is stored in Email.. How do I use the DoCmd.SendObject to send to a list? The command below isn't working:...
1
1929
by: Laura Pouliot | last post by:
Background: I am new to MS Access. I have created a db which contains software inventory information. I would like to utilize a field in the db that contains email addresses of people responsible...
5
495
by: Rebecca Smith | last post by:
My docmd.sendobject quit working! I used to be able to click on a command, and everything worked out fine - a blank email would open addressed to the email address in "txtEmail" and the subject...
2
3137
by: Owen Mac | last post by:
Hello everyone, Is it possible to use an email address from a table and/or query with the Sendobject Method. An email address from my form works fine...what I would like is the 'To:' section be...
0
7216
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
7303
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
7367
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...
1
7018
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...
0
5613
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
5028
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
4699
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...
0
3187
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
407
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...

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.