Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Positioning Pop Up Forms

Introduction

We saw the Pop-up Form in action last week in the article titled Synchronized Floating Pop-up Form. I hope you had a chance to download and explore the demo database as well.

I know I don’t have to speak at length about Forms and their importance in a database — they are, after all, the most essential objects we work with when developing a new project. Microsoft Access Forms are, in many ways, far superior to those designed in Visual Basic.

There was an interesting incident in our office. A Visual Basic Application developed by our Computer Department was installed on one of my colleagues' machines. My friend got a brief introduction from the developer, and he started exploring the new Application.

I was developing in-house Access applications for the Audit Department, sitting just a few workstations away from a friend. After about half an hour, he called me over for some help. I was curious to see what he was working on, so I walked over to his desk. The moment I saw the screen, I immediately understood why he had called me. I couldn’t help but smile — and feel a quiet sense of pride in MS Access Forms, even though I knew that Visual Basic could do many things that Access couldn’t.

Screen Resolution and VB Form

A few years ago, before LCDs came into existence, Computer Monitors were used with 640 x 480 Resolution, and Users preferred to maintain this way because dBase and FoxPro 2.5/3.0-based Applications were also running on their machines. Some Monitors can be set with higher resolutions. When VB Forms are designed on high-resolution Screens and installed on computers with 640 x 480 resolution, the Form will overlap the Screen. Unlike MS-Access Forms, VB Forms don't auto-fit to the current resolution of the Screen.  

The VB Application's Main Switchboard Form overlaps all four sides of the Screen on my colleague's machine, and some controls on the Form, like the Command Buttons and Options Group controls at the left/right edges, are only partially visible on the screen. The Form was designed with a machine having a higher resolution, without knowing the target machine's screen resolution, and ended up this way.  After installation, the programmer didn't bother to do a trial run either.

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, and it is not able to define Pages, and it looked like an oversized wooden board placed behind the screen frame.

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

Access Forms have several Properties, and setting the appropriate values will change their behavior. We can create custom Form properties for specific use. We have set the Pop-up Property Value to Yes in the previous Article to position the EmployeeSub Form above all other Forms.

Popup Form extends Beyond Application Window

When the Database Window is maximized, any form you open in normal mode will automatically expand to fill the same maximized state. However, if the Pop-up property is set to Yes, the form will open in its original designed size, regardless of the database window state. The same behavior occurs if you set the Border Style property to Dialog or Thin, instead of enabling the Pop-up property. But note that doing so removes the Minimize, Maximize, and Restore buttons from the form’s title bar. Setting the Border Style property to None removes the title bar entirely.

It’s a well-known fact that all MS Access objects, such as Forms and Reports, open and remain confined within the Access application window. You can’t normally move any of them outside the boundaries of the Access window, right?

Wrong, you can try this to find out:

  1. If the Access Application Window is in the maximized state, click the Restore Down control button (the middle one between Minimize/Maximize and Close buttons) on the Title bar. There is a Window sizing control at the bottom right 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 the top-left corner of the screen, so that the MS-Access Application Window reduces to about half its size or makes it even smaller. You must be able to see one of your Popup Forms in the database window, and next, you will open it.

  2. Open one of your Popup Forms, and you will see that it overlaps 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. Do not attempt to minimize the MS Access application window while a Pop-up form is open. If you do, the Pop-up form will immediately “jump in” and hide itself along with the application. Likewise, if the Access window is resized to a small area, the Pop-up form may appear over the application window, potentially hiding it completely from view.


Positioning PopUp Form

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

But, what if we want the Pop-up Form to appear in the top right corner, or bottom right 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 bottom right 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 the 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 the design view.

Tip: This works not only for Popup Forms, and for all other Forms.

Share:

No comments:

Post a Comment

Comments subject to moderation before publishing.

PRESENTATION: ACCESS USER GROUPS (EUROPE)

Translate

PageRank

Post Feed


Search

Popular Posts

Blog Archive

Powered by Blogger.

Labels

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