Can anyone please help me make the following statement work?
SystemTime = CInt(Format(Time, "HHnn"))
If SystemTime < 700 Then
MsgBox ("Please wait until after 7:30 AM to receive latest updates, you can still view old data until that time.")
GoTo Allowed
End If
If SystemTime > 730 And SystemTime < 745 Then
InputBox("Password") = "Test"
Else
MsgBox ("Please wait until after 7:30 AM to get back into the system.")
DoCmd.CloseDatabase
End If
Allowed:
End Sub
SystemTime = CInt(Format(Time, "HHnn"))
If SystemTime < 700 Then
MsgBox ("Please wait until after 7:30 AM to receive latest updates, you can still view old data until that time.")
GoTo Allowed
End If
If SystemTime > 730 And SystemTime < 745 Then
InputBox("Password") = "Test"
Else
MsgBox ("Please wait until after 7:30 AM to get back into the system.")
DoCmd.CloseDatabase
End If
Allowed:
End Sub