You are on page 1of 12

Learning Microsoft Access 2007

By Greg Bowden

Chapter 5

Creating More Detailed Forms

Guided Computer Tutorials www.gct.com.au

PUBLISHED BY GUIDED COMPUTER TUTORIALS PO Box 311 Belmont, Victoria, 3216, Australia www.gct.com.au Greg Bowden This product is available in Single or Multi User versions. Single-user versions are for single person use at any particular time, just as a single text book would be used. If you intend to use the notes with multiple students the single user version should be upgraded to the multi-user version. Multi-user versions allow the school or institution to print as many copies as required, or to place the PDF files on the school network, intranet and staff laptops. A certificate of authentication is provided with multi-user versions. Bookmarks provide links to all headings and sub-headings, and individual chapters are provided.

First published 2008 ISBN: 1 921217 52 9 (Module 1) 1 921217 53 7 (Module 2) PDF document on CD-ROM

Every effort has been made to ensure that images used in this publication are free of copyright, but there may be instances where this has not been possible. Guided Computer Tutorials would welcome any information that would redress this situation.

Chapter

Creating More Detailed Forms


When databases become larger it is necessary to be able move fields anywhere on the screen so that all the data can be clearly seen. Access allows you to produce professional-looking screen displays which can be printed or simply designed to make data entry easier. Fields can be moved, graphics, shadings and pictures added, etc. The easier the data entry process is made the less chance there is of incorrect data being entered. In this chapter you will create a data entry form for a department store using DESIGN VIEW.

Starting a New Database


1 2 If you are starting a fresh session, load Microsoft Access. If you are continuing directly from the previous chapter, close the current file.

3 In the Access GETTING STARTED screen click on the BLANK DATABASE icon in the NEW BLANK DATABASE section.

4 In the BLANK DATABASE pane enter the file name BIG CITY, ensure that your STORAGE folder is select underneath it (use the BROWSE button to access it if necessary) then click on CREATE.

Guided Computer Tutorials 2008

5-1

Learning Microsoft Access 2007

Defining the Fields


1 Open the CREATE tab in the RIBBON and click on the TABLE DESIGN icon to start a new table.

Enter the following Field Names, Data Types and Descriptions: Item Code Item Name Department Description Cost Price Retail Price Dealer Photo Text Text Text Text Currency Currency Text OLE Object Enter the items code Enter the items name Enter the items Department Enter a description of the item Enter the cost price of the item Enter the retail price of the item Enter the dealers name and address Import a picture of the item

3 Your field definitions should look like this.

NOTE:

i ii

An OLE Object field allows graphics, sounds or videos to be stored in the field. The descriptions of the fields is not essential, however, the descriptions that you do enter will appear at the bottom of the screen when a field is selected, providing assistance to the person entering the data. We could have adjusted the field sizes of all the fields, but the default settings will suffice for this activity.
Guided Computer Tutorials 2008

iii

5-2

Creating More Detailed Forms

4 The table needs to be saved. Click on the SAVE icon in the QUICK ACCESS TOOLBAR, enter the table name: Data and select OK.

5 You will be asked to set a PRIMARY KEY. This is not necessary for this activity so select NO.

Deleting the First Table


The first table that access provides when you start a database can be deleted. 1 Click on the TABLE 1 tab then RIGHT+CLICK on its icon and select CLOSE.

2 3

The table will be deleted as no fields have been entered into it. Close the DATA table.

Guided Computer Tutorials 2008

5-3

Learning Microsoft Access 2007

Starting the Form


The FORMS section of the program allows you to control how the data will be displayed on the screen. The one database can have several different forms. We will create a form that displays all the fields on the one screen. In this case we will create the form in DESIGN VIEW.

Opening the Form in Design View

1 Open the CREATE tab in the RIBBON and click on the FORM DESIGN icon.

2 The form is opened in DESIGN VIEW which has a grid in the DETAIL section and rulers at the top and left.

5-4

Guided Computer Tutorials 2008

Creating More Detailed Forms

3 Move the pointer over the bottom right corner of the grid. The cursor should change to a cross hair with arrows. Hold down the mouse button and drag the corner to the bottom right corner of the screen.

NOTE:

When creating a detailed data entry screen, usually as much of the screen as possible is used.

Linking the Form to the Data Table

When creating a form in DESIGN VIEW the table or query that stores the data must be specified. Click on the PROPERTY SHEET icon in the RIBBON to open the PROPERTY SHEET pane and, in the DATA tab, set the RECORD SOURCE box to the DATA table.

Guided Computer Tutorials 2008

5-5

Learning Microsoft Access 2007

Setting the Grid

The grid that is provided can be changed to show less dots.

1 In the PROPERTIES SHEET pane open the FORMAT tab.

2 Set the GRID X and GRID Y boxes, which are near the bottom of the list, to 4 so that there are 4 dots per cm.

Inserting Fields
Fields and labels can be placed anywhere on the screen. The purpose of a data entry screen is to make the data as easy as possible to view and enter, so time is usually taken to make data entry screens look attractive. 1 Click on the ADD EXISTING FIELDS icon in the RIBBON and the FIELDS LIST pane replaces the PROPERTY SHEET pane.

2 You can drag the left border of the pane to the right to reduce the width of the FIELD LIST pane if you wish.
5-6 Guided Computer Tutorials 2008

Creating More Detailed Forms

3 Select the ITEM CODE field in the FIELD LIST pane then drag the field (which attaches to the pointer) to be in line with 11 cm in the top ruler and 1 cm in the left ruler.

NOTE:

The co-ordinates on the grid are read as (11,1). That is 11 cm in the top ruler and 1 cm in the left ruler.

4 Select the ITEM NAME field from the FIELD LIST pane and drag it to (4,3). That is, so that its top left corner is in line with 4 cm in the top ruler and 3 cm in the left ruler.

5 Drag the DEPARTMENT field to (11,3).

Guided Computer Tutorials 2008

5-7

Learning Microsoft Access 2007

Understanding the Handles


When you drag a field into the form, a series of handles are placed around the field box. These handles allow the object (call a control in Access) to be moved or resized. The following diagram summarises the handles.
Move handles Resize handles

Field Label

Field box

1 Move the pointer over the DEPARTMENT labels move handle, the large handle at the top left of the label until an arrowed crosshair is added to it then drag the label up and to the left. Only the DEPARTMENT label moves.

Press CTRL+Z to undo the move and return the label to its original position.

3 Try moving just the DEPARTMENT field box using its move handle.

Press CTRL+Z to undo the move and return the field box to its original position.

5-8

Guided Computer Tutorials 2008

Creating More Detailed Forms

5 Move the pointer over the border of the DEPARTMENT field box (not over a handle ) until the arrowed cross-hair is added to it and drag the DEPARTMENT field box to another position on the screen. Both the DEPARTMENT field box and its label should move.

Press CRTL+Z to return the field and its label to their original position.

7 Drag the DESCRIPTION field from the FIELD LIST pane to (4,4).

8 Move the pointer over the bottom right handle of the DESCRIPTION field box until it changes to diagonal arrows and drag the handle to (14,5).

NOTE:

This will make the DESCRIPTION field wider and longer so that more text can be seen on the screen.

Guided Computer Tutorials 2008

5-9

Learning Microsoft Access 2007

Saving the Form


You should save the form regularly as you build it. Microsoft Access saves any data that you enter into a form automatically, but it does not save any of the designing that you carry out.

1 Click on the SAVE icon in the QUICK ACCESS TOOLBAR, call the form: Data Entry and select OK to save the form.

2 Use the arrow next to the TABLES heading in the NAVIGATION pane to set it the ALL ACCESS OBJECTS so that you can see the table and the form.

Looking at the Form


It is good practice to regularly look at how the form is shaping up as you build it. Any obvious errors can be adjusted early. 1 Click on the VIEW icon in the RIBBON at the top left of the FORM window (not the arrow at its base) and your screen should be changed to FORM VIEW. This is where the data is entered.

5-10

Guided Computer Tutorials 2008

You might also like