Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keep Form Inactive? (Access 2000) (Access 2000)

    I have an application in which there are several forms open at once. Once of them (call it frmRsa1), is on a timer. Every x seconds, it checks for the presence of a specific file in a specific folder. This works. However, when it finds this file, it currently becomes the active window. I would like it to remain open and continue its processing but not become the active window. In other words, I would like it to continue in a "background" mode.

    How can I ensure that this form never becomes the active window?

    Thanks.
    Carol W.

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Keep Form Inactive? (Access 2000) (Access 2000

    A timer event by itself shouldn't cause form to become active window. Whatever this form does when it finds file must be causing it to become active window. If one of other open forms is a pop-up form and is maximized, and the form with timer event is not a pop-up form, the pop-up form should remain on "top" of any other open, non-popup forms. Even if you explicitly set focus to non-popup form while pop-up form is maximized, the pop-up form stays on "top" of other open forms.

    Another option would be to simply hide the form with timer event by setting its visible property to false. You can always make it visible again if necessary.

    HTH

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keep Form Inactive? (Access 2000) (Access 2000

    Thanks for the reply, Mark.

    I may be missing something here but I don't see a visible property in the list of form properties. Where would it be?

    It sounds like exactly what I need, if I only could find it <img src=/S/smile.gif border=0 alt=smile width=15 height=15> !

    Thanks.
    Carol W.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Keep Form Inactive? (Access 2000) (Access 2000

    You don't see it on the property sheet. You set it in code like this:

    Me.Visible = False

    or

    Forms!ThisForm.Visible = False
    Charlotte

  5. #5
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Keep Form Inactive? (Access 2000) (Access 2000

    Another option is open form in stealth (hidden) mode. Example:
    <pre>Private Sub Command1_Click()
    DoCmd.OpenForm "frmTimer", , , , , acHidden
    End Sub</pre>

    Note: If form opened in a hidden window using this method, you can make form visible again "manually" by using "Unhide..." command from Window menu, but only if the form is not defined as a pop-up form. If pop-up form opened in hidden mode, you'd have to use code to unhide by setting form's visible property to True. Pop-up forms, even when visible, will not appear in list of open windows at bottom of Window menu.

    Also note, if opening form in hidden mode, make sure there is no On Load or On Open event procedure that opens form in restored or maximized window (such as DoCmd.Maximize); if the form's window is restored or maximized, it will no longer be hidden!

    HTH

  6. #6
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keep Form Inactive? (Access 2000) (Access 2000)

    Thanks for the replies.

    It turns out that the form containing the timer event was not becoming the active form, after all, but I definitely learned something from both of you.

    I love this board <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>.
    Carol W.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •