1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| Private Sub Vendor_Name_DblClick(Cancel As Integer)
'Update_Launch_Date
DoCmd.SetWarnings False
DoCmd.OpenQuery "R0001_Update_GT71_LaunchDate"
DoCmd.SetWarnings True
Dim stDocName As String
Dim stLinkCriteria As String
'stDocName = "NameOfTheDocument"
stDocName = "E0001_R0001_Sel_Vendor_For_GT72"
DoCmd.OpenReport stDocName, acViewReport, , "T0000_Vendor_List.Vendor_Name =" & Me.Forms![F0005_GT71_Vendor_Selection]![F0005ter_GT/71_VendorList_Subform]!Vendor_Name
'DoCmd.OpenReport stDocName, acViewReport, , "T0000_Vendor_List.Vendor_Name ='" & Me.Vendor_Name & " ' "
DoCmd.Close acReport, "E0001_R0001_Sel_Vendor_For_GT72"
'SendEmail
On Error GoTo Err_SendEmail_Click
Dim strDocName1 As String
Dim strEmail As String
Dim strEmailCC As String
Dim strEmailBCC As String
Dim strMailSubject As String
Dim strMsg As String
strDocName1 = "E0001_R0001_Sel_Vendor_For_GT72"
'send Report
strEmail = Me.GenericEmailForQuotation
strEmailCC = ""
strEmailBCC = ""
strMailSubject = "Request for quotation Ref.: " & Forms!F0005_GT71_Vendor_Selection!VendorSelection_GT71Ref
strMsg = "Dear Vendor," & vbCrLf _
& "You will find attached a request for quotaion Ref: " & Forms!F0005_GT71_Vendor_Selection!VendorSelection_GT71Ref & vbCrLf _
& vbCrLf & _
"Closing Date of this RFQ : " & Now() + 3 & vbCrLf & vbCrLf & vbCrLf & "Best Regards" & vbCrLf & vbCrLf & "xxxxxxxxxx"
DoCmd.SendObject acSendReport, strDocName1, acFormatPDF, strEmail, strEmailCC, strEmailBCC, strMailSubject, strMsg
'Update_Launch_Date
DoCmd.SetWarnings False
DoCmd.OpenQuery "R0001_Update_GT71_LaunchDate"
DoCmd.SetWarnings True
Exit_SendEmail_Click:
Exit Sub
Err_SendEmail_Click:
MsgBox Err.Description
Resume Exit_SendEmail_Click
End Sub |
Partager