Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    233

    Unanswered: I have a form i dont want to open maximized

    I have a form i dont want to open maximized this form is displayed by a button on another form that is maximized. What properties do I need to set on the form? (access 2000)

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Look at the PopUp and Modal properties of the form. I often set my forms to a PopUp = Yes and Modal = Yes. The Modal meaning that the user has to close the form before the focus can go back to the previous form (otherwise the Popup form can easily get hidden behind another form if the user clicks on the other form.) I also set the Border Style to Dialog to prevent users from resizing the form. As a note, if you make a continuous form a PopUp, I've found that I usually need to do a docmd.movesize XX, XX, XX, XX in the OnOpen event as continuous forms don't usually size correctly when set as a PopUp.

    Also check the code bank out on Form Manipulation examples. There are some neat examples I uploaded there if you want to do some things like remove the caption bar, remove the MSAccess background, etc...as well as demonstrating different types of ways you can do Popup forms.

    Lastly, one thing I like to do to prevent users from accessing the Access Menu items and force the user to click a button on the form is that I make a form called: MainformBackground (and set Allow Design Changes property to Design View Only so the properties box doesn't show on non-PopUp forms (a pet-peeve of mine.)) The MainformBackground is my startup form and in the OnOpen event of this form I have the following code:

    Docmd.maximize
    docmd.openform "MainMenu"

    where my MainMenu form is set to PopUp = Yes and Modal = Yes. This forces the user to click a button on the MainMenu form and keeps them from going astray clicking anywhere else (the MainformBackground also hides the tables from view). If you want to see how this works, look at the GetUser login example in the code bank. It's a nice way to implement a somewhat secured way of preventing users from getting behind the scenes into design view (in an mdb file.) You can also set the Shortcut Menu property of the form to No so users cannot right-click on the form and select design view (again in an mdb file but don't set this to No if you need to use the filter, cut, copy, or paste which is accessed via right-clicking.)
    Last edited by pkstormy; 01-14-08 at 19:43.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Oct 2003
    Posts
    233
    I set the pop up to true with my existing properties and that worked, thanks!

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Also consider setting the modal to true. Try it out though and see if you click on another form while the popup is open, if it hides the popup. If it does and this isn't what you want, change the modal to true.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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