Hello All,
I have a Table "EmployeeT" and a Form "EmployeeF" that is the input for this table. Each record in the Form is a place for an employee to upload all of their information like "First Name" "Last Name" "Position" "Email address" etc.
I have another Table "NewLabReportT" and a form "NewLabReportF" that is the input for this table. Each record in this form is a place for an employee to upload their most recently completed lab report.
There is an option of Form "NewLabReportF" to select the individual to review this record. The "Reviewer" would be listed in the Table "EmployeeT" and Form "EmployeeF"
If I have not lost you yet...
My goal is when in Form "NewLabReportF" as a user selects their "reviewer" (which the last name is populated from "Employee T") then hits "Submit Record" the email address of the "Reviewer" selected is inserted into my code below:
Private Sub Submit_Record_Click()
DoCmd.SendObject _
, _
, _
, _
"Email @ email. com", _ ''''''''''This is where I want the email address to auto-populate from my Table "EmployeeT"
, _
, _
"***A new Lab Report has been submitted for your review***", _
"Hello," & vbCrLf & vbCrLf & vbCrLf & "Please log into the Lab Report Database and review the latest pending report. If you have any questions please contact the sender." & vbCrLf & vbCrLf & "This is an automated response generated from Microsoft Access." & vbCrLf & vbCrLf & vbCrLf & "Sincerely," & vbCrLf & "Lab Report Database", _
False
DoCmd.Close
End Sub