Introduction
We saw the Popup form in action last week in an article with the Title: Synchronized Floating Popup 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 most important object that we work with when we start developing a new Project. 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 on one of my colleague's machines. My friend got a brief introduction from the developer. My friend started exploring the new Application.
I was developing in-house Access Applications for Audit Department and sitting a few workstations away from my friend. 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 was proud of having MS-Access Forms, even though I knew VB can do many things, which you cannot do in Access.
Screen Resolution and VB Form
A few years ago, before LCDs came into existence, 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. Some Monitors can be set with some 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 Form 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 of the Objects like Command Buttons and Options Group etc., at the edges of the Form are only partially visible on the screen. The Form was designed for 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 a 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.
Popup Form extends Beyond Application Window
When the Database Window is in the 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 open 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:
If the Access Application Window is in the 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 the left top corner direction of the screen, so that the MS-Access Application Window reduces to about half of its size or makes it even smaller. But you must be able to see one of your Popup Forms in the database window and you are going to open it next.
Open one of your Popup Forms and you will see that it jumps out of the Application Window.
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.
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.
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 to 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:
Maximize the Application Window.
Open a Pop-up Form in Design View.
Display the Property Sheet of the Form (View - ->Properties) and see that the Auto Center property is set to No.
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.
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.
Click on the Save Toolbar Button or select Save from File Menu.
Close the Design view of the Form.
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, works on any Form.
No comments:
Post a Comment
Comments subject to moderation before publishing.