R
Raj
I am using the code below to generate and send a email. What I need help in
doing is pull the First Name of the empolyee from tblEmployee and add it
where I have the Currentuser(). I am not sure how to do this and hope
someone can help me with this.
tblEmployee is set as [AutoID],[Last],[First],[UserID]
On Error GoTo Err_cmdSubmit_Click
Dim stDocName As String
stDocName = "tblvacation"
DoCmd.SendObject acSendNoObject, stDocName, , "(e-mail address removed)", , ,
("VACATION REQUEST: " & Me![vacationstart] & _
" thru " & Me![vacationend]), ("Randy," & Chr(10) & "I would like to
schedule these days off for my vacation " & Me![vacationstart] & _
" thru " & Me![vacationend] & ". " & Chr(10) & "Thank you." & Chr(10) &
currentuser()), , True
approvalwaiting.Value = False
Exit_cmdSubmit_Click:
Exit Sub
Err_cmdSubmit_Click:
MsgBox "You cancelled this operation, your email was not sent.", 0, "
EMAIL NOT SENT!"
Exit Sub
Resume Exit_cmdSubmit_Click
doing is pull the First Name of the empolyee from tblEmployee and add it
where I have the Currentuser(). I am not sure how to do this and hope
someone can help me with this.
tblEmployee is set as [AutoID],[Last],[First],[UserID]
On Error GoTo Err_cmdSubmit_Click
Dim stDocName As String
stDocName = "tblvacation"
DoCmd.SendObject acSendNoObject, stDocName, , "(e-mail address removed)", , ,
("VACATION REQUEST: " & Me![vacationstart] & _
" thru " & Me![vacationend]), ("Randy," & Chr(10) & "I would like to
schedule these days off for my vacation " & Me![vacationstart] & _
" thru " & Me![vacationend] & ". " & Chr(10) & "Thank you." & Chr(10) &
currentuser()), , True
approvalwaiting.Value = False
Exit_cmdSubmit_Click:
Exit Sub
Err_cmdSubmit_Click:
MsgBox "You cancelled this operation, your email was not sent.", 0, "
EMAIL NOT SENT!"
Exit Sub
Resume Exit_cmdSubmit_Click