MushroomKing
Registered User.
- Local time
- Yesterday, 20:33
- Joined
- Jun 7, 2018
- Messages
- 100
Hi everyone. My "simple" code i cant get to work.
I want the application to close at a certain time.
So i have a table with a time in it to close. (i use a table because it needs to be able to be changed by the end user in some setup form).
So i want to the value from that table and use it as an inbetween. But it dont work, and doesnt give me an error either.
Anyone knows? Would be much appreciated
I want the application to close at a certain time.
So i have a table with a time in it to close. (i use a table because it needs to be able to be changed by the end user in some setup form).
So i want to the value from that table and use it as an inbetween. But it dont work, and doesnt give me an error either.
Anyone knows? Would be much appreciated
Code:
Private Sub Form_Timer()
Dim closingtime As String
closingtime = DLookup("timevalue", "closetime")
If Time() > closingtime And Time < TimeValue("05:30:00") Then
Application.Quit
End If