Tuesday 26 March 2013

How to Create a form in MS Access 2007

What is a form?

A form is an Access object. It generally serves three purposes:
  1. To allow users to perform data entry. Data can be inserted, updated, or deleted from a table using a Form object.
  2. To allow users to enter custom information, and based on that information perform a task. For example, you may want to ask a user for parameters before running a report.
  3. To allow users a method of navigating through the system. For example, you may create a form where a user can select a form to load, a report to run, etc.
You can view all of your form objects in the Navigation Pane. To do this, click on the Navigation Pane menu and select "Object Type" from the popup menu.

Creating a Form

Let's take a look at creating a new form "from scratch".
Select the Create tab in the toolbar at the top of the screen. Then click on the Form Design button Microsoft Access in the Forms group.
Microsoft Access
We are now viewing our form in design view. You should see a blank form that looks like this:


Microsoft Access

Right-click on the form and select Properties from the popup menu.
Microsoft Access
When the Property Sheet appears, select Form from the drop down. You should now see the properties for the Form object.
Microsoft Access

Record Source property

The Record Source property sets the source of the data for the form.
For example, if you want to create a data entry form for the Suppliers table, you would specify Suppliers as the Record Source. This means that if you add a new record in the form, it will insert a record into the Suppliers table. If you modified a record within this form, the data in the Suppliers table would also be modified.
The Record Source property can be set to a table name, query name, or you can build your own SQL statement by invoking the Query builder (ie: clicking on the button with the three dots to the right of the Record Source property)
Microsoft Access