Switchboard question

Niniel

Registered User.
Local time
Today, 12:59
Joined
Sep 28, 2006
Messages
191
Hello,

I use my switchboard to launch a search form, which then starts another form to edit records. Everything works fine except that after I click on the record I want to edit, the switchboard window not only remains open, but also is in the forground in front of the record I want to work on.
Is there a simple trick to make sure my form is in the foreground, or that the switchboard is minimized?

Thank you.
 
normaly an new form opening does take the top position. is this a wizard built switchboard or a custom form?

you could open your edit form pop-up which will make it sit on top of everything else

HTh

Peter
 
It's wizard built.

If I make my other form a pop-up form, will that cause problems with other pop-up forms that may get launched from that form?
 
Last pop-up wins. (Gets top position.)

Watch out for security suites that block pop-ups.
 
Ok, thanks.

So is there another way, or is making my edit form into a pop-up form my best bet?
 
Well, if you really don't want to go the pop-up route you could use the on_open event of your edit form to make the switchboard invisible, and then use the on_close event of your edit form to make the switchboard form visible again...

...I use this route because I like to make custom forms instead of wizard-created switchboards. If you do this, don't forget to test that the switchboard form is loaded/open before setting its visible property.
 
Ah, that's a neat idea.
How then do I make an entire form in/visible? Just like controls on a form?

And once the board is invisible, will it still be in front of my form? In other words, instead of clicking on the form to edit something would I actually be clicking on the invisible switchboard?
 
Btw, the weird thing is, if I open the form in Add mode, it does go to the foreground.
Or is that because the Add mode makes my form a pop-up type form?
 
I would use something like:
Code:
if isloaded("Yourswitchboardname") then Forms!Yourswitchboardname.Visible= False 
' makes the switchboard invisible if it is loaded...use true to make it visible.

If you don't already have the isloaded function then here it is...

Code:
Function IsLoaded(ByVal strFormName As String) As Boolean

  'Returns True if the specified form is open in Form view or Datasheet view.
    
    Const conObjStateClosed = 0
    Const conDesignView = 0
    
    If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
        If Forms(strFormName).CurrentView <> conDesignView Then
            IsLoaded = True
        End If
    End If
    
End Function

invisible objects cannot be clicked on so you don't have to worry about accidentally clicking it if it is invisible and still 'in front'.
 

Users who are viewing this thread

Back
Top Bottom