G
Gee
I just can’t find out how to do this. Everything in this code works
perfectly but I need it to send without having to click the “Send†button
when it gets to Outlook, I need it to just send and go back to the routine.
I had seen some mention of .SEND but I have no idea where to put that or how
to use it. I had seen some things about SendMail also, but don’t know where
to put that either. I’m running out of time and really need to get this
project finished.
Please help and thank you.
Gee
This is my code, what it does is run a timer, in a form from a query that
shows only the “NOC†calls. When the timer gets to 15 minutes it will send
an email to a tech, when it reaches 30 it will send an email to a different
tech. I need it to just run in the background on a computer and not need to
be clicked to send the report.
Private Sub Form_Timer()
Dim currentTime As Date
currentTime = Format(Now(), "h:m:s")
Me.txtCurrentTime.Value = currentTime
If CallDate > 0 Then
NOC = DateDiff("s", TimeValue(CallDate), TimeValue(txtCurrentTime))
End If
If NOC = "900" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text39, , , "NOC
AGING", Me.CallNo, , False
End If
If NOC = "1800" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text41, , ,
Me.CallNo, "NOC Aging", , False
End If
If CallDate > 0 Then
DoCmd.GoToRecord , , acNext
Else: DoCmd.GoToRecord , , acFirst
End If
End Sub
perfectly but I need it to send without having to click the “Send†button
when it gets to Outlook, I need it to just send and go back to the routine.
I had seen some mention of .SEND but I have no idea where to put that or how
to use it. I had seen some things about SendMail also, but don’t know where
to put that either. I’m running out of time and really need to get this
project finished.
Please help and thank you.
Gee
This is my code, what it does is run a timer, in a form from a query that
shows only the “NOC†calls. When the timer gets to 15 minutes it will send
an email to a tech, when it reaches 30 it will send an email to a different
tech. I need it to just run in the background on a computer and not need to
be clicked to send the report.
Private Sub Form_Timer()
Dim currentTime As Date
currentTime = Format(Now(), "h:m:s")
Me.txtCurrentTime.Value = currentTime
If CallDate > 0 Then
NOC = DateDiff("s", TimeValue(CallDate), TimeValue(txtCurrentTime))
End If
If NOC = "900" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text39, , , "NOC
AGING", Me.CallNo, , False
End If
If NOC = "1800" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text41, , ,
Me.CallNo, "NOC Aging", , False
End If
If CallDate > 0 Then
DoCmd.GoToRecord , , acNext
Else: DoCmd.GoToRecord , , acFirst
End If
End Sub