steps to create the sample personnel database to create a database design the database in order for...

12
1 Steps to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table. Additionally, time should be spent on what the purpose of the database will serve (reports – what kind of printouts do you want, forms – how do you want to enter the data, queries – what questions do you want to ask of the data). I would suggest using paper and pencil to outline the look of the table and jot down questions about what the purpose of the database will serve. This is very important prior to even opening up Access. Using Access – Getting Started Unlike the other Office products, Access asks you where to create the database prior to designing it. It is good practice to create a folder labeled “My Databases” either in My Documents or on the C: drive of the computer. Knowing where you store the database will help you later when you want to move the database to another location. Double Click the Access Icon on the desktop or navigate to the programs list and click on the Access Icon. The following window will appear:

Upload: dinhtram

Post on 22-May-2018

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

1

Steps to Create a Database

Design the Database In order for a database to be effective some time should be spent on the layout of the table. Additionally, time should be spent on what the purpose of the database will serve (reports – what kind of printouts do you want, forms – how do you want to enter the data, queries – what questions do you want to ask of the data). I would suggest using paper and pencil to outline the look of the table and jot down questions about what the purpose of the database will serve. This is very important prior to even opening up Access. Using Access – Getting Started Unlike the other Office products, Access asks you where to create the database prior to designing it. It is good practice to create a folder labeled “My Databases” either in My Documents or on the C: drive of the computer. Knowing where you store the database will help you later when you want to move the database to another location.

Double Click the Access Icon on the desktop or navigate to the programs list and click on the Access Icon. The following window will appear:

Page 2: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

2

The first time you create a new database and you want to design the table, click the bullet next to the words “Blank Access database”. The following window will appear:

Here is where you would locate the folder to store the database. Navigate to the folder where you want to save the database. Type a name for the database and click the Create button. The following window will appear:

This is the access database object window.

Page 3: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

3

Creating the Table On the left hand side under the word Objects, Tables should be indented (selected). Double Click on the words that read, “Create table in Design view”. The following window will appear:

Here is where you name the Fields and determine the Data Type. Field Name In the column Field name, click in the white box next to the black arrow. Type in the name of the field. Now press the Tab key to go to the Data type column. Data Type You are now in the Data type column. There are several types of data types that can be chosen. Press the Tab key once and the cursor is now in the description column. Description This column is optional and can be beneficial to people who enter data in a form view. What is typed here will show up in the status bar at the bottom of the form.

Page 4: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

4

Using the Lookup Wizard to enter in values for a drop down box One of the choices for a data type includes a lookup wizard, which allows you to type in the values for the data. The person entering data can click on a down arrow and choose from a list. In the data type column click on the drop down arrow and click on the words Lookup Wizard… The following screen will appear:

Click the white circle next to the words “I will type in the values that I want.” Click Next The following window will appear.

Make sure there is a number 1 in the box next to the words Number of columns:

Page 5: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

5

Click in the row under Col1 and type in the first value for the drop-down box. Press the Tab key to enter in values for each row. Click Next. The following window appears:

Make sure the label of the lookup column is correct. Then click Finish. To view the values that were just entered do the following: Locate the two tabs below the table and click on the Lookup tab.

Page 6: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

6

Locate the Row Source and look at the numbers. These are the numbers that you entered when you went through the lookup wizard. Access codes the source separating the numbers with semi-colons. If the lookup values had text, the code would show the text with quotes around the value and separated by semi-colons. If you want to change the values you entered in the lookup wizard you must do it from the Lookup tab and click inside the row source and type in the appropriate changes. You must include semi-colons and quotes (if the values are text). Setting up a field with an Input Mask There are several different input masks that Access will create for you. The main ones being phone number, social security number, zip code, Extension, password, Long time, short date, medium time, medium date. Type in the name of the field (phone number) Click the tab key Click on the General Tab near the bottom of the window:

Locate the words Input Mask and click in the white box. At the end of that white box you will see a button with three ellipses. Click on that button.

Page 7: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

7

The following window will appear:

Click Yes In the Save as table window, type in a name for the table. Click Ok. A window will appear asking you to set the primary key. Click Yes. The following window will appear:

Make sure Phone Number is selected and click next.

Page 8: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

8

The following window will appear:

Click Next. The following window will appear:

Choose one from the list. Click Next

Page 9: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

9

The following window appears:

Click Finish. Entering Data To enter data in datasheet view: In the database objects window, the table name will appear in the list.

Page 10: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

10

Double click on the table name. You can now enter data (look for the “vcr” buttons in the lower left hand corner).

Press the tab key to navigate through the fields.

Page 11: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

11

Saving/moving the database to another location You cannot click on file and choose save as to save the database to another location. You need to know where you created the database and then copy the database. Then navigate to the place on the computer or network or floppy disk and then paste the database. Locate the database:

Click once on the database Click on Edit from the menu bar and click on Copy The database is now on the clipboard in the computer Close the folder Navigate to the place where you want to paste the database. Click on Edit from the menu bar and click on Paste. You now have the database in two different places.

Page 12: Steps to Create the Sample Personnel Database to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table

12

Using Word to Create a Report from data in Access

Open Access • Click on Tables from the data object window • Double Click on the table name (viewing the data in datasheet view) • Click on Edit • Click on Select All Records (all the records will be highlighted in black) • Click on Edit • Click on Copy

Open Word

• Click on File • Click on Page Setup • Margins Tab • Change the margins to .3 or .5 • Click on Paper Size Tab • Change the orientation to Landscape

Only do these steps if the database has several fields and you want the data to try and fit on one page. • Click Ok

• Type a title for the database • Click on Edit • Click on Paste • The records will be pasted into a table.

To delete columns in the table

• Move the pointer around the top of the column name until you see a solid black arrow appear. Click once when you see the arrow – this selects the entire column.

• Delete the column • Right click on the selected column • Click on Delete Columns

To resize columns

• Move the pointer around the column divider until you see the pointer change to an arrow pointing left and right. Click until you see a vertical dotted line appear. Now click and drag the column divider (the dotted line will move) until you are happy with the size of the column.