Hi
I am wondering is someone can help. I have a project where an Access Query is being used as an update table where values are filtered i.e. FieldName = Approval_Status Value = Pending. After the page is edited by a user and the Approval_Status value changed, the record disappears from the list page as it has changed. This is all ok.
However, what I am trying to do is this:-
User chooses a records from the list page to edit.
User changes Approval_Status value and submits.
An email is sent as per designated fields
However, a message is not displaying on the edit page of "An email has been sent to the employee" before it redirects to the list page.
All is working OK except for the message on the web page. Any ideas how I can make this work so that the message displays on the edit page after the email has been sent but before the page redirects to the list page? Here is the code that I am using for this snipet -
Dim dkeys, tmpDict, msg, n
msg ="This is an auto generated email to advise of your HDA Application status." & vbcrlf
msg = msg & "" & vbcrlf
msg = msg & "ID: " & dict("HDA_Record_ID")& vbcrlf
msg = msg & "Name: " & dict("Employee_Name")& vbcrlf
msg = msg & "Staff No: " & dict("Employee_No")& vbcrlf
msg = msg & "Port: " & dict("Port")& vbcrlf
msg = msg & "Manager Email: " & dict("Manager_Email")& vbcrlf
msg = msg & "Allowance Type: " & dict("Allowance_Type")& vbcrlf
msg = msg & "HDA Start Date: " &format_shortdate(db2time(dict("HDA_Start_Date"))) & vbcrlf
msg = msg & "HDA End Date: " &format_shortdate(db2time(dict("HDA_End_Date"))) & vbcrlf
msg = msg & "Higher Duties Grade From: " & dict("Higher_Duties_From")& vbcrlf
msg = msg & "Higher Duties Grade To: " & dict("Higher_Duties_To")& vbcrlf
msg = msg & "Relieving Employee: " & dict("Relieving")& vbcrlf
msg = msg & "Relieved Employee's Staff No: " & dict("Relieved_Employees_No")& vbcrlf
msg = msg & "Approval Status: " & dict("Approval_Status")& vbcrlf
msg = msg & "Approved/Reviewed By: " & dict("Approval_By")& vbcrlf
msg = msg & "Approved/Reviewed Date: " &format_shortdate(db2time(dict("Approval_Date")))& vbcrlf
msg = msg & "Comments: " & dict("Comments")& vbcrlf
msg = msg & "" & vbcrlf
msg = msg & "Should you have any queries regarding this email, please direct them to your Manager - " & dict("Manager_Email") & vbcrlf
if values("Approval_Status")= "Approved" then
set tmpDict = CreateObject("Scripting.Dictionary")
tmpDict("to")=dict("Email")
tmpDict("cc")=dict("Email_Approval_To_1")
tmpDict("cc")= tmpDict("cc") & ";" & dict("Email_Approval_To_1")
tmpDict("subject")="HDA APPLICATION APPROVED - " & dict("Employee_Name")
tmpDict("body")=msg
set ret=runner_mail(tmpDict)
message="An email has been sent to the Employee & Payroll"
ElseIf values("Approval_Status")= "Declined" then
set tmpDict = CreateObject("Scripting.Dictionary")
tmpDict("to")=dict("Email")
tmpDict("subject")="HDA APPLICATION DECLINED - " & dict("Employee_Name")
tmpDict("body")=msg
set ret=runner_mail(tmpDict)
message="An email has been sent to the Employee"
if not ret("mailed") then
response.write ret("message")
end if
end if
Any help would be appreciated!