Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email notification

Status
Not open for further replies.

JimMc

Technical User
Sep 28, 2000
3
GB
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!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top