Hi there,
I am new here and an not great with access. I do manage to stich code together to achieve my goals. Below is my code to send an e-mail from within a form using outlook. It all works fine apart from the fact my access system is essentially locked out whilst the New E-Mail Window is open.
This is very annoying as I still want to refer and use my access form whilst the e-mail window is open, and not be frozen out until I send or exit from the e-mail.
Regards
Steve
*********************************************
Private Sub Command187_Click()
On Error GoTo OakErr
Dim stWhere As String '-- Criteria for DLookup
Dim varTo As Variant '-- Address for SendObject
Dim stText As String '-- E-mail text
Dim RecDate As Variant '-- Rec date for e-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stWho As String '-- Reference to tblUsers
Dim stHelpDesk As String '-- Person who assigned ticket
Dim strSQL As String '-- Create SQL update statement
Dim errLoop As Error
varTo = "Email_address_here" stSubject = "* Invoice for your attention* " & "Our Reference : " & Me.Claim_Ref & "- (" & "Invoice Number : " & Me.Invoice_Num & ")"
stText = "Please find attached an Invoice for your attention." & Chr$(13) & _
" " & Chr$(13) & _
"Our Reference : " & Me.Claim_Ref & Chr$(13) & _
"Invoice Number : " & Me.Invoice_Num & Chr$(13) & _
"Policy Ref Num : " & Me.Policy_Ref_Num & Chr$(13) & _
"Vehicle VRM : " & Me.Registration & Chr$(13) & _
" " & Chr$(13) & _
" " & Chr$(13) & _
" " & Chr$(13) & _
"Regards" & Chr$(13) & _
"Steve " & Chr$(13) & _
"Director" & Chr$(13) & _
" " & Chr$(13)
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, -1
OakErr:
End Sub
*********************************************
I am new here and an not great with access. I do manage to stich code together to achieve my goals. Below is my code to send an e-mail from within a form using outlook. It all works fine apart from the fact my access system is essentially locked out whilst the New E-Mail Window is open.
This is very annoying as I still want to refer and use my access form whilst the e-mail window is open, and not be frozen out until I send or exit from the e-mail.
Regards
Steve
*********************************************
Private Sub Command187_Click()
On Error GoTo OakErr
Dim stWhere As String '-- Criteria for DLookup
Dim varTo As Variant '-- Address for SendObject
Dim stText As String '-- E-mail text
Dim RecDate As Variant '-- Rec date for e-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stWho As String '-- Reference to tblUsers
Dim stHelpDesk As String '-- Person who assigned ticket
Dim strSQL As String '-- Create SQL update statement
Dim errLoop As Error
varTo = "Email_address_here" stSubject = "* Invoice for your attention* " & "Our Reference : " & Me.Claim_Ref & "- (" & "Invoice Number : " & Me.Invoice_Num & ")"
stText = "Please find attached an Invoice for your attention." & Chr$(13) & _
" " & Chr$(13) & _
"Our Reference : " & Me.Claim_Ref & Chr$(13) & _
"Invoice Number : " & Me.Invoice_Num & Chr$(13) & _
"Policy Ref Num : " & Me.Policy_Ref_Num & Chr$(13) & _
"Vehicle VRM : " & Me.Registration & Chr$(13) & _
" " & Chr$(13) & _
" " & Chr$(13) & _
" " & Chr$(13) & _
"Regards" & Chr$(13) & _
"Steve " & Chr$(13) & _
"Director" & Chr$(13) & _
" " & Chr$(13)
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, -1
OakErr:
End Sub
*********************************************