G
Guest
Hi,
I am trying to automate a process within my database. The process being that
when a Super User rejects a transaction it will generate an email to the user
who last modified the record with details of why the transaction has been
rejected.
Here is the code I have been trying to use.
Private Sub Form_AfterUpdate()
If [AR Manager Approval] = "Rejected" Then
DoCmd.SendObject acSendNoObject, _
To:=[LastModifiedBy], _
Subject:="Your transaction request has been rejected", _
MessageText:="Your request to have" & [CustomerName] &
[Invoice Number] & _
" sent to debt refferal has been rejected for the following
reasons - " & _
[Rejected Reason]
End If
End Sub
I am getting the following run time error when the code tries to execute.
Error 2465 - Bad Debt Tracking can't find the field '|' reffered to in your
expression.
I have checked the code and all looks fine. But I am not familiar with vba
in access.
Can someone please help with this query or maybe suggest an alternative?
I am trying to automate a process within my database. The process being that
when a Super User rejects a transaction it will generate an email to the user
who last modified the record with details of why the transaction has been
rejected.
Here is the code I have been trying to use.
Private Sub Form_AfterUpdate()
If [AR Manager Approval] = "Rejected" Then
DoCmd.SendObject acSendNoObject, _
To:=[LastModifiedBy], _
Subject:="Your transaction request has been rejected", _
MessageText:="Your request to have" & [CustomerName] &
[Invoice Number] & _
" sent to debt refferal has been rejected for the following
reasons - " & _
[Rejected Reason]
End If
End Sub
I am getting the following run time error when the code tries to execute.
Error 2465 - Bad Debt Tracking can't find the field '|' reffered to in your
expression.
I have checked the code and all looks fine. But I am not familiar with vba
in access.
Can someone please help with this query or maybe suggest an alternative?