I am trying to create a document approval cycle within my database. Each record is split into four sections which all require approval, once aproved notification should then be passed onto the next recipient. I am trying to carry out this process by allowing the person who is approving a section to identify the next recipient and then hit an approval button which will send an email telling the next person that A partcular record is ready for approval.
For some reason this appears to work only once and then not again until I have closed Access down and started again.
Here is the code:
***********************************************************
Private Sub btnOrderApproval_Click()
Dim RecordNumber As String
Dim ToTechnical As String
Dim Msg, Style, Title, Response, MyString, Approved
RecordNumber = Me!DocumentNo
ToTechnical = Me!IssuedToTechnicalName
Msg = "You have now approved document '" & RecordNumber & "' and sumbitted it to '" & ToTechnical & "'."
Style = vbOKOnly
Title = "Order Approval"
Response = MsgBox(Msg, Style, Title)
DoCmd.SendObject acSendQuery, "Contract_PlanningMerge", acFormatXLS, "'" & ToTechnical & "'", , , "Contract Planning document '" & RecordNumber & "' is ready for your approval. Please update through the Contract Planning Application. ", False
Me!OrderApprovalField = "Approved"
Me.Refresh
End Sub
************************************************************
This is driving me berserk I need your help!!
For some reason this appears to work only once and then not again until I have closed Access down and started again.
Here is the code:
***********************************************************
Private Sub btnOrderApproval_Click()
Dim RecordNumber As String
Dim ToTechnical As String
Dim Msg, Style, Title, Response, MyString, Approved
RecordNumber = Me!DocumentNo
ToTechnical = Me!IssuedToTechnicalName
Msg = "You have now approved document '" & RecordNumber & "' and sumbitted it to '" & ToTechnical & "'."
Style = vbOKOnly
Title = "Order Approval"
Response = MsgBox(Msg, Style, Title)
DoCmd.SendObject acSendQuery, "Contract_PlanningMerge", acFormatXLS, "'" & ToTechnical & "'", , , "Contract Planning document '" & RecordNumber & "' is ready for your approval. Please update through the Contract Planning Application. ", False
Me!OrderApprovalField = "Approved"
Me.Refresh
End Sub
************************************************************
This is driving me berserk I need your help!!