Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Positioning Pop Up Forms

We have seen the Pop up form in action last week in an Article with the Title: Synchronized Floating Pop up Form. I hope you have downloaded the Demo Database as well.

I know, I don't have to talk at length about Forms and their importance in a database, because that is the first piece of object we would like to lay our hands on, the moment we decide to start learning MS-Access and wants to put all kinds of fancy objects all over the Form. MS-Access Forms are far better than Forms designed in Visual Basic.

There was an interesting incident in our office long back. A Visual Basic Application developed by our Computer Department was installed in one of my colleague's machine. My friend got a brief introduction from the developer before he left the scene. My friend started exploring the new Application.

I was sitting few workstations away from him and after about half an hour he called me and asked for some help. I was also very curious to have a look at the new Application. When I set my eyes on the screen I realized why he called me and he confirmed that too. I couldn't resist a smile on my face and pat myself on my back for working with MS-Access Forms, even though I knew VB can do many things, which you cannot do in Access.

Few years ago most of the Computer Monitors were used with 640 x 480 Resolution and the Users preferred to maintain this way because dBase and Foxprow 2.5/3.0 based Applications were also running on their machines.

The VB Application's Main Switchboard Form overlaps on all four sides of the Screen on my colleague's machine and some of the Objects like Command Buttons and Option Group etc. at the edges of the Form are only partially visible on the screen. The Form was designed on a machine with a higher resolution without knowing where he is going to install it and ended up this way.

As far as I know, VB Form doesn't have any Control Buttons (Min/Max, Restore and Close) on the Title Bar; no sizing handles, no Header/Footer Sections or able to define Pages and it looked like an oversize wooden board placed behind the screen frame.

I really felt few inches taller when positive remarks came from the Users of my MS-Access Databases.

Coming back to the point, we can change the behavior of the Form by setting its Property Values and we have seen several of them through earlier examples. We have set the Pop up Property Value to Yes in the previous Article to position the EmployeeSub Form above all other Forms.

When the Database Window is in maximized state if you open a normal Form it will also adjust itself to the maximized state. But, if the Pop up Property value is set to Yes then the form will open in its original designed size. This is true if you set the Border Style Property value to Dialog or Thin instead of setting the Pop up Property value. But, this will remove the Minimize/Maximize; Restore Window Buttons on the Title Bar. Setting the Border Style property value to None will remove the Title Bar totally.

It is a well known fact that all MS-Access Objects like Forms/Reports opens and stays within the MS-Access Application Window. You cannot take any of them out of the Application Window boundaries, right?

Wrong, you can, try this to find out:

  1. If the Access Application Window is in maximized state then click the Restore Down control button (the middle one between minimize/maximize and close buttons) on the Title bar and you will find a Window sizing control at the right bottom corner of the Application window. When you place the mouse pointer there it will change into a double-headed arrow. Click and drag the corner up, moving the mouse towards left top corner direction of the screen, so that the MS-Access Application Window reduces to about half of its size or make it even smaller. But you must be able to see one of your Pop up Forms in the database window and you are going to open it next.
  2. Open one of your Pop up Forms and you will see that it jumps out of the Application Window.
  3. If you didn't make the Application window small enough then click on the Title Bar of the Pop up Form and drag it out of the Application Window. You can place both the Pop up Form and Application Window side by side or place the Pop up Form over the small Application window to hide it completely.
  4. Don't attempt to minimize the MS-Access Application Window, if you do then the Pop up Form will jump in and hide. If the Application window is very small then the Pop up Form may open over the Application window hiding it completely.

Forms have another Property Auto Center. Usually this property is set to Yes along with the Pop up Property settings to make the Form to appear in the middle of the Application Window.

But, what do we do if we want the Pop up Form to appear in the top right corner or right bottom corner or any place other than the center of the Screen? There are no Property settings to make this happen. But there is a simple way to get this done, try the following method:

  1. Maximize the Application Window.
  2. Open a Pop up Form in Design View.
  3. Display the Property Sheet of the Form (View - ->Properties) and see that the Auto Center property is set to No.
  4. If the Form's design frame is larger than the actual design size then reduce the design frame size by dragging the right bottom corner to the desired size.
  5. Click on the Title Bar of the Form and drag it to the right top corner (or any other position you prefer) and place it there.
  6. Click on the Save Toolbar Button or select Save from File Menu.
  7. Close the Design view of the Form
  8. Now, Open the Form in Normal View. The Form will appear where you have placed and saved it in design view.

Tip: This works not only for Pop up Forms, works on any Form.


No comments:

Post a Comment

Comments are subject to moderation before publishing.


Subscribe in a reader
Your email address:

Delivered by FeedBurner


Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Follow by Email


Forms How Tos Functions MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet Class Module MS-Access Scurity MS-Access and Internet Queries msaccess reports Array External Links msaccess tips Accesstips Menus and Toolbars Objects Downloads MsaccessLinks Process Controls Property Art Work Event Collection Object Controls WithEvents msaccess How Tos Graph Charts VBA msaccessQuery Combo Boxes List Boxes Command Buttons Data Emails and Alerts Form Query Report Calculation Command Button Custom Wizards DOS Commands Data Type Dictionary Object ms-access functions msaccess functions msaccess graphs msaccess reporttricks Item Object Reference RaiseEvent msaccessprocess security advanced Access Security Add Custom Functions Field Type Fields Form Instances Key Macros Menus SubForm Top Values Variables msaccess email msaccess menus progressmeter Access2007 Auto-Number Copy Expression Join Methods Microsoft Numbering System Records Recordset Security Split Table Time Difference Utility Workgroup Wrapper Classes database ms-access msaccess wizards text tutorial vba code Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Conditional Formatting Data Filtering Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Tables Union Query User Users Water-Mark Word automatically commands function hyperlinks iSeries Date iif msaccess msaccess alerts pdf files reference restore switch toolbar updating upload

Featured Post

WithEvents and Report Line Highlighting

Introduction This is really a re-run of an earlier Post: Highlighting Reports published during August, 2007.  The full Code was written on ...


Blog Archive

Recent Posts