Scenario. I'm creating an AutoScheduler that will open certain reports at certain times. This will run constantly in the background. I've tried two different things. One is
If Time = #8:00:00 AM# Then
DoCmd.openreport "printlog", acViewNormal
ElseIf Time > #8:00:00 AM# Then
DoCmd.openreport "New Report", acViewNormal
and the other is
Dim TheHour As Integer
TheHour = Hour(Now)
If TheHour >= 8 And TheHour <= 9 Then
DoCmd.openreport "Printlog", acViewPreview
ElseIf TheHour >= 11 And TheHour <= 24 Then
DoCmd.openreport "New Report", acViewPreview
End If
I need a little help. Both will not print or open the report. What am I doing wrong?
If Time = #8:00:00 AM# Then
DoCmd.openreport "printlog", acViewNormal
ElseIf Time > #8:00:00 AM# Then
DoCmd.openreport "New Report", acViewNormal
and the other is
Dim TheHour As Integer
TheHour = Hour(Now)
If TheHour >= 8 And TheHour <= 9 Then
DoCmd.openreport "Printlog", acViewPreview
ElseIf TheHour >= 11 And TheHour <= 24 Then
DoCmd.openreport "New Report", acViewPreview
End If
I need a little help. Both will not print or open the report. What am I doing wrong?