On the right side of its icon , by default, a form displays its name. In reality, the string on the right side of the icon is called the caption of the form. The caption of a form is recognized by the Caption property. If you do not specify the caption, the title bar of a form displays its name.
To specify the caption of a form, access its Properties window and, in the Format or the All tab, click Caption and type the desired string.
We mentioned that a form was represented in its top section by a tab. When a form displays with a tab, the right section of the tab(s) displays a close button that you can use to close the form.
If you want, you can replace the tab of a form and let the form display without the tab. To do this, click File and click Options. In the left frame of the Access Options dialog box, click Current Database. In the right frame and in the Document Window Options section, click the Tabbed Documents radio button and remove the check mark on the Display Document Tabs check box, then click OK. On the message box that appears, click OK. Close and reopen the database. By default, a form displays with a tab, in which case the user cannot move it. Otherwise, a form can appear as a regular window with its system buttons. To take care of this, you can click File and click Options. In the left frame, you can click Current Database and, in the right frame, in the Document Window Options sections, click the Overlapping Windows radio button:
After making the selection, you can click OK. You will be asked to close and reopen the database:
Which you should do.
If you display a form as overlapped, it would be equipped with three system buttons , or , . Here is an example:
The group of these buttons is called the Control Box. If you do not want these system buttons at all, access the Properties window of the form and set the Control Box Boolean property to No from its Yes default value. In this case, the form would appear with neither the system icon nor the system buttons. If you do this, make sure the user has a way to close the form.
Like a regular window container, the form displays a title bar in its top section. If the database is configured to show overlapped windows, on the left side of the title bar, a form displays an icon. The system icon is fixed and you should not spend time trying to change it. The system icon holds a menu that allows the user to perform the regular operations of a Windows container, including minimizing, maximizing, restoring or closing the window. To display this menu, the user can click the form's system icon:
The presence of the form's system icon is partly controlled by the Control Box property of a form. In most cases, you should make this system icon and its menu available to the user. If for some reason you don't want to provide this functionality, set the Control Box property to No. The form would appear as follows:
If you decide to do this, make sure you provide the user with the ability to close the form and this type of title bar makes it impossible. Of course, a user may know that the form can be closed by pressing Ctrl + F4.
The middle section of the title bar is actually referred to as the title bar. It can be used to change the view of the form after right-clicking it.
Instead of completely hiding all system buttons of a form, you can specify which ones to display and thus control the ability to close, minimize, or maximize the form. The presence and/or the role of the system buttons is (partly) managed by the Control Box and the Min Max Buttons properties. When the Control Box property is set to No, regardless of the value of the Min Max Buttons property, there would be no system buttons on the title bar. If you want to control the appearance and behavior of the system buttons, the Control Box property must be set to Yes. The values of the Min Max Buttons produce the following results:
Depending on the role and probably the number of Windows controls on a form, you will decide what button to allow or not.
Whether you allow the system icon and system buttons or not, the user needs to be able to know where a form starts and where it ends. This is seen by the borders of the form. In most cases, you will not be concerned with this aspect. Otherwise, you can control the borders of a form.
If a database is configured to show overlapped windows, the borders of a form are controlled using the Border Style property. If you set it to None, the form would appear without borders.
Before using a form or performing an update in it, in most cases, you probably would need to open it first but this may depend on what you want to do at the time. This is because a form offers many types of views. One of them in the Form View. Here is an example:
To open a form in Form View:
Another type of display of a form is called Layout View. It shows how an object is visually positioned (laid out) on the form:
The Layout View is available only if the objects on the form are based on the columns of a table. To open a form in Layout View:
One more view of the form is used to design or modify the way a form looks. This is referred to as Design View:
To open a form in Design View:
The main area of the form is what the user will mostly use. This is also referred to as the body of the form. If you create a form using the Form Wizard, it (the wizard) can assist you with deciding how the objects in the body of the form would display. Forms can be designed in various flavors: Columnar, Datasheet, Tabular, Justified. As another way to specify the view of a form, you can display it in Design View. Then, in the Format or the All tab of the Properties window, use the options in the Default View field:
A columnar form is used to display data one record at a time. This is a convenient display for data entry and analysis because the user is able to examine each piece of information for each one record:
A tabular form displays its data in a series of cells
following continuous sets of records. All or almost all records are
displaying in a single layout:
To create a tabular form, use the Form Wizard and select its option. Otherwise, you can design a from from scratch. Then, in the Format or the All tabs of the Properties window, set its Default View to Continuous Form.
A Datasheet form looks and behaves like a table, displaying all possible records at the same time instead of one record at a time. A datasheet form is mainly used in relationships to display another table's related records. It is also suitable for people who prefer to work in a spreadsheet environment. This display allows the database developer to provide a sheet view to the data entry personnel without making the table's design or formats available.
You can make the same form available in Form View and Datasheet View. In fact, most forms are. Users can switch from Form View to Datasheet View by clicking the View menu.
To create a Datasheet form, use the Form Wizard and select its option. You can also design a from from scratch. Then, in the Format or the All tabs of the Properties window, set its Default View to Datasheet.
A Justified form provides a consistent look with borders added to labels.
A split form is made of two sections. The top section displays like a normal Form View and shows one record at a time. The bottom section displays a datasheet view of (all) the records (if the area is big enough):
When using the split form, if you click a record in the bottom section, its values display in the top section. To automatically generate a split form, in the Navigation Pane, click the table that holds the records. Then, on the Ribbon, click Create. In the Forms section, click Split Form. To create a split form by design, start a form in Design View or display an existing form in Design View. In the Properties window of the form, set its Record Source to the table that holds the value and set its Default Value to Split Form. If it is bran new form without some previously created fields, use the Field List to add the desired fields to it.
When it comes up, a form is presented as a rectangular box. A form in Design View is made of a form selection button, two rulers, two scroll bars, a horizontal bar labeled Detail, and a body. By default, a form presents a section referred to as the Detail section. This section starts from the Detail bar to the lower end of the section. The Detail bar displays only when the form is in Design View.
The Detail section serves as the main host of other controls. It can also serve to display messages of various kinds. The Detail section can be enhanced by manipulating its properties. These properties are not necessarily related to the parent form but can be used conjointly with it.
We mentioned earlier that the form itself controls its width. The vertical dimension of a form is controlled by its sections. This means that a section, such as the Detail section, can "decide" how much height it needs to accommodate its content. The vertical measurement of the Detail section is controlled by the Height property. There are two main ways you can change the Detail section's height at design time:
Besides the Detail section, a form can be equipped with a section on top and another section in its bottom part. To add these sections, you can right-click the middle of the form and click Form Header/Footer
This would add two new sections to the form: the Form Header section on top and the Form Footer section at the bottom:
Although two sections are added, you can reduce one completely so it would not appear to the user. This means that you can keep one section and hide the other. If you create a form using the Form Wizard, both the header and the footer sections are added but the footer section is completely reduced so it would not appear to the user. If you want to display it to the user, you must expand it.
A form can also be equipped with two other sections. To get them, you can right-click the middle of the form and click Page Header/Footer.
This would add two new sections to the form: a Page Header and a Form Header sections. These sections would not appear to the user. They appear only if the user decides to print a form, in which case they would appear on the printed paper. Like the form sections, you can use either one or both the Page Header and the Page Footer sections
A form is equipped with special horizontal lines used to visually separate sections of a form. They do not perform any other special action. To equip a form with dividing lines, add a header and a footer sections. If you create a form that is directly equipped with a header and a footer sections, it would display the dividing lines.
The presence or absence of the horizontal lines is controlled by the Boolean Dividing Lines property. If you set its value to Yes, the dividing horizontal lines would display on the form. To hide both lines, you can set this properties value to No. To hide an individual line, you can completely reduce its section.
As much as you can, you should design your (non-Datasheet) form to display all of the fields of a record whenever the/a record comes up. Sometimes this will not be possible. If a form possesses too many fields for each record, Microsoft Access would equip the form with one or two scroll bars. A scroll bar allows the user to scroll from one side of the form to another. The vertical scroll bar is used to scroll up and down while the horizontal scroll bar allows scrolling left and right:
By default, scroll bars come up if the form "judges" them necessary, such as if some fields, or some area of some fields, are hidden. The presence of scroll bars allows the user to be aware of hidden fields. Depending on your design, you can control the appearance or disappearance of the scroll bars. To do this, change the values of the Scroll Bars field in the Format property page. There are four possible values. To display only the vertical scroll bar, set the value to Vertical Only:
In the same way, you can display only the horizontal scroll bar by selecting Horizontal Only. On the other hand, you can display both scroll bars by setting the value to Both. If for some reason you do not want any scroll bar, set the Scroll Bars property value to Neither.
A form is equipped with a special area that allows you to select a record. This area is called the Record Selector. The Record Selector is on the left side immediate to the left side of a record on the form. Its size depends on the type of record. For a regular form (Single Form), the record selector is the long vertical box on the left of all records:
On a datasheet form, a tabular form, or the datasheet section of a split form, the record selector is the box on the left side of each individual record. This means that the view of the form can display many record selectors, one for each record. In the following screenshot, the record selector of each record is the blue box on its left:
If you do not want a form to display the record selector(s), in its Design View, set its Record Selectors property to No.
In the bottom section, a form is equipped with the same navigation buttons used on tables. These buttons are useful only if the form is meant to display data. The buttons are available if the form is displayed in a view other than the Design View.
If you do not want a form to display the navigation buttons, set its Navigation Buttons property to No.
By default, a form is equipped with a status bar or navigation bar. On the left side of the bar, it displays the Record: label. If you want, you can change that string to a short one of your choice. To change the text on the left side of the navigation bar, in the Properties window of the form, click the Format tab and, in the Navigation Caption field, enter a string of your choice. Here is an example of a result (notice the Navigator string on the lower-left side of the bottom bar):
The width of a form is the distance from its left border to its right border. The width of a form is the common width of each one of its sections. All sections use the same width. To widen or narrow a form, position the mouse on the right border of one of its sections. The mouse cursor would turn into a vertical line with a horizontal double arrow:
You can then click and drag right to widen or left to narrow the form.
The width of a form is a numeric value. To change its value with more precision, access the Properties window of the form. In either the Format or the All tab, click the Width field, type a decimal value and press Enter.
The height of a form is controlled by its sections. For this reason, each section controls its own height. The total heights of all sections constitute the height of the form. Based on this, to resize a form, you must actually resize one or some of its sections. To heighten a section on a form, position the mouse on the lower portion of the section. For the headers or the Detail sections, that will be the upper border of the lower bar. For the lowest section, the mouse must be positioned on the lower border. The cursor turns into a narrow horizontal line with a vertical double-arrow:
The height is a numeric value. As mentioned already, each section of a form controls its own height. Based on this, to numerically change the height of a section of a form, access the Properties window of that section. In either the Format or the All tab, click the Height field, type a decimal value and press Enter. This also means that, to set the total height of a form, you can change the Height value of each section.
To change both the width and the height of a form at the same time, you can position the mouse on the lower-right corner. The cursor would change into a small square with 4 arrows:
You can then click and drag left, right, up, down, or diagonally.
To numerically change the width and the height of a form, change the value of the Width of the form. Then change the Height values of the individual sections.
When you open a form from the Navigation Pane, the object is positioned from the top-left corner of the gray area of Microsoft Access. If you want the form to be automatically centered, access its Properties window and, in the Format or the All tab, set its Auto Center Boolean property to Yes from its default No value.
While designing a form, you may stretch its right and/or its bottom borders beyond the actual borders of the form. Consider the following screenshot:
When you preview the form, it would appear with the expanded size, which is not the actual size of the form. The above form would produce:
When the form is previewed, to get its actual size, on the Ribbon, click Home. In the Window section, click the Size To Fit Form .