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:
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 18:43.
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)