L
LouMalnati
When the below code runs for some reason the form gets
closed. Please note there is no longer any code in the
Form_Load event
Private Sub Form_Timer()
'On Error GoTo frmstartup_err
Dim dteFileTme As Date
Dim dt As Long
Dim ErrorNumber
Dim strErrorMsg As String
Dim strErrBuild As String
strErrorMsg = "FormTimer Function Failed"
dteFileTme = Format((Now), "h:mm:s am/pm")
dt = WeekDay(Date)
Select Case dteFileTme
Case #7:00:00 AM# To #4:30:00 PM#
Select Case dt
Case 2 To 6
Case Else
Exit Sub
End Select
Case Else
Exit Sub
End Select
LoadData
Exit_Here:
On Error Resume Next
Exit Sub
frmstartup_err: ' Error-handling routine.
ErrorNumber = Err.Number
strErrBuild = chrErrorBody & " " & ErrorNumber &
strErrorMsg & ""
SendNotesMail chrErrorSubject, "", chrRecips,
chrCcRecips, chrbccRecips, strErrBuild, True
Resume Exit_Here
End Sub
closed. Please note there is no longer any code in the
Form_Load event
Private Sub Form_Timer()
'On Error GoTo frmstartup_err
Dim dteFileTme As Date
Dim dt As Long
Dim ErrorNumber
Dim strErrorMsg As String
Dim strErrBuild As String
strErrorMsg = "FormTimer Function Failed"
dteFileTme = Format((Now), "h:mm:s am/pm")
dt = WeekDay(Date)
Select Case dteFileTme
Case #7:00:00 AM# To #4:30:00 PM#
Select Case dt
Case 2 To 6
Case Else
Exit Sub
End Select
Case Else
Exit Sub
End Select
LoadData
Exit_Here:
On Error Resume Next
Exit Sub
frmstartup_err: ' Error-handling routine.
ErrorNumber = Err.Number
strErrBuild = chrErrorBody & " " & ErrorNumber &
strErrorMsg & ""
SendNotesMail chrErrorSubject, "", chrRecips,
chrCcRecips, chrbccRecips, strErrBuild, True
Resume Exit_Here
End Sub