Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Practice1 Access.doc
Скачиваний:
3
Добавлен:
31.08.2019
Размер:
651.78 Кб
Скачать
  1. Launching Microsoft Access

Microsoft Access is launched from the Windows desktop in a manner similar to that used to launch Microsoft Word, Excel, or PowerPoint. You can launch Microsoft Access either from the desktop shortcut or from the Start program.

  • To open Microsoft Access using the desktop shortcut:

Double-click the Microsoft Access shortcut icon on the Windows desktop.

  • To open Microsoft Access using the Start program:

  1. Click the Start button located in the lower left corner of the Windows screen.

  2. Click the Programs option on the Start menu.

  3. Click the Microsoft Access selection.

  1. Creating a new database.

When you open Microsoft Access, Access 2003 Getting Started Task Pane will appear on the right side of your Access 2003 screen. Сlick the left mouse button on Create a new file. The New File menu screen at the on the right will appear when you click the left mouse button on Create a new file. Click–on Blank database:

Picture 3 creating a new database and saving its.

In the upper left corner of the File New Database menu screen that appears, you will see a Save in: Z:\ group №\...

Next click-in the area to the right of File Name:. Delete any text (db1) that is entered in the area and then type-in: Dean's office. And the area to the right of Save as type don’t change: .mdb

Then click-on the Create button.

  1. Creating a table «Lecturers»

Picture 4 Microsoft Access ContactManagement.

To begin designing the database, please click-on Tables in the left border and then click-on the button «Design» at the top or double click-on «Create table in Design view» in the "white" area.

Picture 5 Design view

There are three things: Field name, Data Type, and Description, and, in the lower half of the window Field Properties.

Add some field name for creating the table «Lecturer»:

Table 3 Structure of the table « Lecturers ». Part 1.

Field name

Data Type

ID lecturer

Number

Last name

Text

First Name

Text

Middle name

Text

Now notice in the lower part of the screen, under Field Properties, that a box appeared when you selected the Text Data Type. This box is "tailored" to the Text Data Type that you selected above:

Picture 6 Field Properties for Text Data Type.

Field Size: Is currently set to 50 characters. That's pretty large for a name. So, click-in this area and change the number to 15 (you can make this larger or smaller later if you have to). Also you should change this area for First name and Middle name:

Table 4 Field name and its properties.

Field name

Field Properties

ID lecturer (Number)

Field Size: integer or Autonumerical

Last name (Text)

Field Size: 15

First Name (Text)

Field Size: 13

Middle name (Text)

Field Size: 15

Before saving the table we need to assign a primary key. Click on the name of the field that will be the primary key (ID lecturer). Click on the Primary key button on the toolbar. On the left of the field name will appear a key indicating to us that this field is the primary key of the table.

Save this table.

Then add some field name more:

Table 5 Structure of the table « Lecturers ». Part 2

Field name

Data Type

Date of birth

Date/Time

Position

Lookup Wizard…

Experience

Number

Department

Text

Phone

Text

Pay

Currency

Some annotations:

  • Date of birth: type- Date/Time.

We'll use an Input Mask for Date of birth for the convenience of date input:

Picture 7 Field Properties. Input Mask.

Сlick-in the area to the right of Input Mask and write: 99.99.99 or click-on the button «the three dots» and select any form by the Input Mask Wizard.

  • Position:

Field Size: 25

Create a combo box for this field. To start the wizard you will need to position yourself in the design window of the table over the type of data field («Position») that will contain the data extracted from the list and select Lookup wizard... Select «I will type in the values that I want». A second screen appears where we need to indicate the values filling the column:

  • Professor

  • Associate professor

  • Senior lecturer

  • Assistant

Once we have introduced all of the values press the Next> button to continue to the next screen where we can type a name for the column.

  • Experience. Type: Number.

Field Size: integer

Also this value should be >0. For this:

Picture 8 Field Properties. Validation rule and Validation text

Validation rule: This property permits us to control the entry of data according to a specified criteria.The criteria must to be typed to ensure that any value introduced into the field is good.

Write in this area: >0, so when data is entered and not matches the condition, an error message will be displayed.

Validation text: In this property we will write the text which we wish to appear in the case of us trying to introduce a value into a field that does not comply with the validation rule specified before.

Write this area: Erorr- Length of service shuold be >0.

  • Phone: type – Number.

Field Size: 9

Use Input Mask for this field:999-99-99

In the end you have the table «Lecturers»:

Table 6 All structure of the table «Lecturers»

Field name

Data Type

ID lecturer

Number

Last name

Text

First Name

Text

Middle Name

Text

Date of birth

Date/Time

Post

Lookup Wizard…

Length of service

Number

Department

Text

Phone

Text

Pay

Currency

Save this table.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]