Determine the WindowMode of a form

  • Thread starter Thread starter DevlinM
  • Start date Start date
D

DevlinM

I'd like to be able to determine the WindowMode in which a form is opened.
For instance; if I open the form as acDialog, I want to be able to determine
this through some method, if it exists.

Currently I pass this information to the form when it is opened and create a
property to tell its WindowMode.
 
I'm not *positive* this can't be done, but after a number of years hanging
around these boards and reading a majority of the posts, I've never seen any
mention of functionality like this.

I would assume your current method would be the best way to go about it.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Don't know exactly which windowmodes you are trying to check but have you
tried the acDialog test by a select statement? You can use the currentview
option but that will only tell if the form is in formview or datasheet view.
Maybe something like testeing for the various windowoptions could give what
you want.
 
There is a Modal property to the form (read/write)... that might do it.

If Not Me.Modal Then
Msgbox "Can use other forms with this open"
Else
MsgBox "Close/Hide this before changing object focus"
End If

Maybe that's all you're looking for...

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Hi Jack,

No, that's not what I'm looking for. Unfortunately, setting the form to
Modal and the Pop-Up to true isn't quite the same as if the form is opened as
acDialog. Some obscure characteristics of the dialog are altered based on
the WindowMode specified in the OpenForm command.

Thanks for your input though. It is appreciated.
 
Some obscure characteristics of the dialog are altered based on
the WindowMode specified in the OpenForm command.

Correct. I don't use either of these either, preferring acDialog instead.
In any case, a browse through the properties of the Form object doesn't
reveal anything that might be an indication of the windowmode. SOL on this
one I think...

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Back
Top