Create Forms
Create Forms
Forms
A form is a type of a database object that is primarily used to enter or display data in a database. Most forms are
bound to one or more tables and queries in the database. A form's record source refers to the fields in the underlying
tables and queries.
It is also primarily being used to enter or display data in a database. You can also use a form as a switchboard that
opens other forms and reports in the database, or as a custom dialog box that accepts user input and carries out an action
based on the input.
A data-entry form
A switchboard form
A custom dialog box
About Forms
A bound form stores or retrieves data from its underlying record source. Other information on the form, such as
the title, date, and page number, is stored in the form's design. A form:
focuses on one record at a time
can display fields from more than one table
can also display pictures and other objects
can contain a button that prints, opens other objects, or otherwise automates tasks
The form created is linked to the table and information entered in the fields of the form is stored in the table.
A form need not contain all the fields from each of the tables or queries that it is based on.
When you open a form, Microsoft Access retrieves the data from one or more tables, and displays it on the
screen with the chosen layout in the Form Wizard, or with the layout that you created on your own in design view.
Graphic elements, such as lines and rectangles, are stored in the form's design.
A calculation comes from an expression, which is stored in the form's design.
Descriptive text is stored in the form's design.
You create a link between a form and its record source by using graphical objects called controls. The most
common type of control used to display and enter data is a text box.
Labels display descriptive text.
Text boxes display data from and enter data into the Products table.
A text box uses an expression to calculate a total.
Based on a single table or query by using Auto Form. Auto Form creates a form that displays all fields and
records in the underlying table or query. If the record source you select has related tables or queries, the form will
also include all the fields and records from those record sources.
Based on one or more table or query with a wizard. The wizard asks you detailed questions about the record
sources, fields, layout, and format you want and creates a form based on your answers.
On your own in Design view. You create a basic form and customize it in Design view to suit your requirements.
During the previous Learning Outcome, we were tasked to create a simple form using design view, today we will
create a Form using a form wizard.
To start with, open Ms Access 2003 then click on File > Open. Then locate the database file StudentsDB.mdb
that we have created before. After which, the database window for the Students DB will appear. Click the Forms tab on
the Objects list then select Create form by using wizard. The screen should resemble like this..
Button
Choose what layout do you want then click next. After that, choose style and then click next again.
Save your form with the name that you desire. But for this
Lesson, let us use Students DB. You can choose to open the
form To view or enter information or To modify the form’s
design and then click Finish.
Navigation bar
Click on the label or text that you wanted to modify the format and then click on the different formatting tools as
shown above. You can change the Font, Fontsize, its orientation (B-bold, I-Italize, U– Underline). You can also change
the alignment (left align, center, right align), fill color, font color and line color. Try the formatting that would fit your
viewing specifications.
You could also resize the text fields in form design view so it can show the largest possible data on it. I will
resize the address text field so it could display a long address. Do it by clicking then stretching the field to the desired
length as shown below
After resizing it in design view, close it then save the changes. To view changes, double-click the StudentsDB
form file to be found in the database window under form tab and it will resemble in a form view as shown above.
For some more modifications, alter the form and object properties to fit your viewing and data entry needs. For
object properties, right-click on the object during design view then chooses Properties. For form properties, right-click
on the leftmost square part of the form during design view then chooses Properties.
Object and form have different sets of properties. Though there are some properties that are common to both of them.
You can do trial and error so you’ll get familiar with the different properties of an object and the form itself.
Note: to make changes on the form design, you need to do it in design view, to view changes, you need to shift to form
view by saving the changes first.