Forms are designed for various purposes. Some forms can be used to enter data, which is their primary and most usual purpose. you can use other forms for data viewing only because sometimes you don't want some users or inappropriate users to modify the content of a database. Some other forms can be designed as intermediate dialogs between other forms, for example, you might want to make sure that a user performs a certain operation before she can open another form; otherwise, you would not make the second form available. Another form can be used as a printing directory, the point where users decide what to print and how.
Forms Overview:
Since there are many things you can include in a form, there are also various ways you can create them. A form can derive from a table or a query. In fact, a form can come from various parts of different tables. Also a form can be used to calculate variables derived from other parts of the database.
You can control the features of your form by including controls from the toolbox.
When creating a form, you have a lot of choices from where to start. This time again, you can use a wizard to create a form, you can also create a form from Design View. You can insert a form in your application by going through the Insert -> Form menu. The New Object button on the standard toolbar provides a way of creating a form using either the AutoForm or the Form choices.
Whenever you want to create a form, the first decision you make is to tell Microsoft Access where data is coming from. As a form can be created from one or more tables; it can also originate from one or more queries. A form can also use a combination of tables and/or queries. If data is originating from more than one source, you have to create relationships among those sources, or make sure that they are related.
Forms Layout:
Forms can be designed in at least four flavors: Columnar, Datasheet, Tabular, and Justified.
The most popular of them, a columnar is a form made of labels, edit boxes, combo boxes, etc. A datasheet form looks like a spreadsheet, it is made of rows and columns separated by gridlines. A tabular form looks like a datasheet form except that it is made of "physical" gridlines whose dimensions you can modify. A justified form is the cousin of the columnar and the tabular forms.
A form is made of labels, edit boxes, combo boxes, graphics, and other control items...
Creating Forms - Columnar Forms:
The Microsoft Access AutoForm Feature:
You can create a form easily by using the AutoForm feature once you have a source that will provide all the necessary information.
- Open the Books2 database.
- From the Database Window, under the Objects bar, click the Tables button, then click the tblBooks table once to highlight it.
- On the Standard toolbar, click the New Object:AutoForm button.
- A form based on that table is automatically created for you.
- When you have finished looking at the new form, save it as frmBooks.
- Close the form.
- Use the AutoForm feature to create a form based on the tblBookCategories table. Save the form as frmBookCategories.
To create a form using the form wizard, you decide the origin of data and the field necessary for your form.
From the Database Window, click the Forms Object button. Then double Create Form By Using Wizard.
The first page of the form wizard allows that you choose the originating table or query that will supply the necessary fields in the form.
- From the Table/Queries combo box, choose the tblBooks table.
- From the Available Fields: list box, you can select all fields or decide which ones you want to include in the form. From the field list, double-click ShelfNumber, Author, BookTitle, CopyrightYear, and Comments. Then, click Next.
- Accept or choose the Columnar layout, then click Next.
- Choose the Standard style and click Next.
- Name your table wfmBooks and click Finish.
Just like a table, you can delete a form if you don't like the way it looks, or for some reason it doesn't accomplish the desired purpose. You just right-click it in the Database Window and choose Delete, then confirm. You can also highlight it in the Database window and press the Delete Key on the keyboard.
- With the Books3 database still opened, from the Database Window, click the Forms object.
- Right-click on the wfmBooks form and choose Delete from the popup menu. A warning/confirmation message will allow you to change your mind. Click No.
- With the wfmBooks form still highlighted, click the Delete key on the keyboard and make your decision whether to delete it or not.
- Now you can close everything.
Click the Office Assistant and type: Create a Form.
Click Create a form.
Click Create a form on my own.
Click See examples of what forms are and how they work.
Click the small graphic and view.
No comments:
Post a Comment