email address

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
MN,

Yes, you can use an email address from your database. How do you know
which record to use?
 
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
 
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.
 
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")
 
Back
Top