LookupRecord Macro Enable EMail - Access 2010 Web Database (No VBA; Must be done in M (1 Viewer)

gdgonzal

Registered User.
Local time
Yesterday, 20:59
Joined
Apr 13, 2012
Messages
11
Hello All:

I have an issue that I cannot seem to resolve. What I want is that when a buyer sets the status of a productivity record to "Request Mgr Approval" an e-mail is sent to the manager maintain on their user tbl. So far what I have below only sends e-mails to ID 1 of the user table and it should instead change dependant on the the "Assigned Buyer" is in the Productiivty tbl. Any assistance would be appreciated, thank you.


Productivity Tbl contains:
ID: Which is AutoNumber for tbl
Assigned Buyer: Lookup to Users tbl

Users Tbl contains:
ID:Which is AutoNumber for tbl
Buyer Name: Text name of buyer
Buyer EMail: E-Mail for buyer
Mgr Name: Text name of buyer mgr
Mgr EMail: E-Mail of buyer's mgr

Status Tbl contains:
ID:Which is AutoNumber for tbl
Status: "Request Mgr Approval" which has ID of 2

Productivity Amount Tbl contains:
ID:Which is AutoNumber for tbl
FK: Which is foreign key of Productivity Tbls autonumber ID
Amount: Currenct Amt
Status: Lookup from Status tbl

Productivity Amount:After Update:

If [Status]=2 Then
Look Up A Record In Productivity
Where Condition = [ID]=[ProductivityAmount].[ForeignKey]
Alias

Look Up A Record In Users
Where Condition = [ID]=[Users].[ID
Alias
SendEMail
To = [User].[ManagerEMail]
Cc
Bcc
Subject: "Subject Here"
Body: "Body Here"
 

Users who are viewing this thread

Top Bottom