E
Earl.AKA J.Alladien in access forum!!
Hi All,
I have a form with following code set on current(which is triggered
automatically by my timer on 3 seconds,so it runs automatically from record
to record) :
SEND = -1
'Arvin Meyer 03/12/1999
'Updated 7/21/2001
On Error GoTo Error_Handler
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = Forms![Names1]![E-mail Address]
.Subject = Forms![Names1]![SUB]
.Body = Forms![Names1]![Body]
.SEND
'.ReadReceiptRequested
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
I want the form to close automatically after the last record has been send
out,How do I do that?
Thanks in advance!
I have a form with following code set on current(which is triggered
automatically by my timer on 3 seconds,so it runs automatically from record
to record) :
SEND = -1
'Arvin Meyer 03/12/1999
'Updated 7/21/2001
On Error GoTo Error_Handler
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = Forms![Names1]![E-mail Address]
.Subject = Forms![Names1]![SUB]
.Body = Forms![Names1]![Body]
.SEND
'.ReadReceiptRequested
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
I want the form to close automatically after the last record has been send
out,How do I do that?
Thanks in advance!