How to create a form with Access

Support de cours how to create a form with Access, tutoriel & guide de travaux pratiques Access en pdf.

Forms provide a user-friendly interface for data entry, which avoids the use of the Datasheet View format. A form contains no data of its own, but provides a window for viewing the table or query. Exhibit 6.1 is a sample form from the Northwind database that can be used for input into the Products table of the Northwind database. You may view other sample forms in the Northwind database that accompanies the Access program.

How to create a form

To create a form object:
• Select Forms/New/Design View.
• From the list box select the table for which you will provide input data. Now select the Courses table from the scroll down window box.
• Click OK.
The Design View gray grid should open, and a small box called a field list containing the fields of the Courses table should open for use:
• Maximize the Design View Window and stretch the gray grid to cover the entire screen.
• Click and drag the desired field values from the field list to the gray grid. For our first form, select all fields in the table and place them on your grid. (To select more than one field, hold the control key down while making your selection).
o While in the field list for the Courses table, click on the desired field or fields.
o Drag and drop each field onto the gray grid.
o Adjust all fields for viewing. Make sure your text box is large enough to view its content.
 On your gray grid there should appear a combo box, containing a white text box combined with a gray label box.
 The white text box is used to for data input. The gray label box contains the title or caption of the text box for the reader will view.
 See for yourself… view the form in Form View….
• View your form in Form View.
o Notice that the text box contains the content of a single record from the Courses table. This record is the first of twelve records that were previously entered in the Courses table.
o You can view all existing records in the Courses form by advancing the record number at the bottom of the form.
o Now look at the form in Datasheet View. These are the same records you viewed in Form View.
• Select Design View again and make the following alterations to the label caption:
o Stretch the labels on the form grid to make these labels more visually attractive.
o Click inside the label box and highlight the contents:
 Change the captions to all CAPITAL LETTERS.
 Change the font color to red.
 Change the font type to bold.
o Provide the following modifications to the form:
 Align the label boxes and text boxes as follows:
 Align all labels so they are left justified and all letters of each label’s caption are visible in Form View.
 Align all text boxes so they are right-justified and all contents of the text box are visible in Form View.

• Save the form as frmCoursesXX, where XX represents your initials.

Now lets create a graphics logo for your form. In Design View:
• Open the toolbox icon from the menu bar.
• Select the unbound object icon from the open toolbox.
• Select the “Microsoft Clip Gallery”.
• Choose any clipart from among the “Academic” ClipArts. Insert it in your form.
• Resize the inserted clipart. If you have trouble resizing, right-click and choose
All properties/Size mode/Stretch. This will fit the object in the window you have created.
• View the Form again in Form View. Continue to modify the form until your are satisfied with its appearance.
• Save the form frmCoursesXX again.

…….

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *