form "locked" or not active

G

GeorgeMar

I have an application that opens a Main form, which in turn opens a hidden
form. The hidden form has a timer function that counts the time that the
user has been inactive and makes the hidden form visible. In the sub, I have
me.visible=true.

The form displays OK but is "Locked" or seems Inactive. The buttons on the
form are locked and the form cannot be closed.

The main form has PopUp=No, Modal=Yes. The Hidden form has PopUp=No and
Modal=Yes.

Any suggestions?

Many thanks
george
 
G

GeorgeMar

Thank Doug

When I make the hidden form non-modal, the main form has the focus and the
hidden form is still locked. I can't even grab it and move it.

Thanks
George
 
S

Stefan Hoffmann

hi George,
The main form has PopUp=No, Modal=Yes. The Hidden form has PopUp=No and
Modal=Yes.
As long as your main form is visible, it is blocking the message loop,
cause it is a modal form. So your former hidden form can't be activated.


mfG
--> stefan <--
 
G

GeorgeMar

The code is: DoCmd.OpenForm "frmDetectIdle", , , , , acHidden

The form frmDetectIdle has a timer that if there has been no action in the
apps it displays itself with Me.Visible=True.

Thanks
George
 
A

AccessVandal via AccessMonster.com

The easiest solution is to set the hidden form to
remain invisible and stay invisible and
Popup and Modal = No in the form properties.

In the Timer Event add,

If MsgBox("Idle for too long, please shut down." _
, vbOKCancel, "Timer") = vbOK Then
DoCmd.RunCommand acCmdExit
End If

Changing Popup and Modal properties requires the hidden form to be in design
mode. That requires a Sub or Function to change the properties and open the
form again.

Might not work at all or may not be what you want.
 
G

GeorgeMar

Thank you all

I did try poping up a message. The problem is that if the computer is
unattended, all process is suspended until the user responds to the message
dialogue. What I want is that, if the user does not respond with a set time
that the whole application closes.

The best way to do that is to pop up a form with a timer. Since the hidden
form has a timer I wanted to use it. The form gives the user the option to
cancel the closing down action and continue or close the apps.
 
A

AccessVandal via AccessMonster.com

In this case, the hidden form's timer event will need open another Visible
Popup Form with an event timed to close the application and with a button to
cancel the event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top