VBA Timer event making form disappear (1 Viewer)

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 18:47
Joined
Nov 8, 2005
Messages
3,294
Hello everybody..


I have what is probably gong to be very simple ..
on my start up form "Welcome"
a timer event (interval 1000)

If (Time() >= "04:20" And Time() <= "04:22") Then

Quit acQuitSaveAll

End If

- all well and good and does the job I want (to kick all users out at x time )
when I move from the welcome form to form A and back (close form) - all ok
when I move from Welcome to form A and then on to form B the Welcome form disappears - -
odd - any ideas ?(I I go welcome A - B then back B-A to Welcome and this has only occured when I put a timer event onth e welcome form - take it off and it works?)
 

Ranman256

Well-known member
Local time
Yesterday, 21:47
Joined
Apr 9, 2015
Messages
4,337
in the form A, when time is up, use form A: UNLOAD event, put docmd.OpenForm "frmB"
then when A closes, B opens.
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 18:47
Joined
Nov 8, 2005
Messages
3,294
Not quite what I had in mind

front form - has a timer event on it nad this dispperas once I go beyond form A

Front Form - Form A - and back Front form visible
Front Form -Form A - Form B and then back Form B form A and then it should be front form - - this is not visible
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 02:47
Joined
Sep 12, 2006
Messages
15,660
I can't see that this expression can work, can it? Wouldn't time have to be inside ## delimiters?

If (Time() >= "04:20" And Time() <= "04:22") Then
 

Users who are viewing this thread

Top Bottom