email address

G

Guest

I have created a macro send object. I need to inform certain email
recepient(s) for their action. Is there any way I can 'grabe' the email
address from a table rather than typing it every time the macro is run? Your
Help Appreciated.
 
S

Steve Schapel

MN,

Yes, you can use an email address from your database. How do you know
which record to use?
 
G

Guest

I do not need to send any recods etc. What I nned to send is plain text
telling the recepient that there is purcahse order to approve. Currently, the
macro runs, email opens, and I physically put in the email address,
depending on the dept manager. I nned to know how to garb the email address
from a table, for example.
Thanks
 
G

Guest

Steve, I would have ,say, three macros. If amount = <100, use macro1, grab
email for person1, if amount = >10000, use macro2, grab email address for
person2 etc.
 
S

Steve Schapel

MN,

Based on the limited amount of information you have given, I suppose
this would be one possible scenario...

Assuming Amount is a control on a form, and assuming you have a table
with these fields:
Person
EmailAddress
MinumumAmount
MaximumAmount

.... then you could make a query based on this table, and in the criteria
of the MinimumAmount column, put the equivalent of:
<[Forms]![YourForm]![Amount]
.... and in the criteria of the MaximumAmount column, put the equivalent of:
[Forms]![YourForm]![Amount]

And then, in the To argument of the SendObject macro, you could put...
=DLookup("[EmailAddress]","NameOfQuery")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top