Just as the Table objects store data in your Microsoft Access database, the Form objects serve as the user interface between the user and your data. Allowing users unfettered access to your data is never a good idea — in a real database application users should have no access to Tables at all and should only be able to view, add, edit or delete data via Forms and Reports!
A Form can be based on a Table (or multiple related Tables) or on a Query (or multiple Queries). A good start is to create a Form based on a single Table. The Form will by default be created with controls for each field in the Table and the controls will inherit many properties from the Fields on which they are based.
Creating a simple Form is as easy as:
- Navigating to the Create menu
- clicking the Form Wizard command button
- selecting the Object on which you wish to base your Form
- selecting which Fields from that object you wish to include on your Form
- choosing a layout for the Form
- giving the new Form a name (use the converntion of prefixing the name with “frm”, e.g. frmUsers)
Your new form will allow you to view, add, edit and delete records from the underlying objects. You will hear people referring to CRUD: Create, Read, Update and Delete.
As mentioned earlier, Forms are the main elements of the UI of your database application. There are many, many properties that can be set to achieve the aim of restricting access to the data in your tables, such as setting a Form for data entry only.
Forms can be used in a number of special cases for quite other purposes:
- To create a Splash Screen for your database
- Creating a menu screen for your database