Step Creating an Access Database

The first file to place in the TimeTrack folder is the Microsoft Access database. This database will contain two tables for storing and retrieving employee timesheet data.

1. Launch Microsoft Access (version 2000 or 2002) and create a new database named C:\Inetpub\wwwroot\TimeTrack\TimeTrack.mdb.

2. Create two tables, as shown in Figures 17-32 and 17-33.

3. Set up primary keys in both tables. In the tblTimeSheets table the PrimaryKey is TSheetId. In tblTimeSheetDetails the PrimaryKey is based on two fields: TSheetId and DayOfWeek. Because the tblTimeSheet details will be searched by EmployeeName, it is a good idea to define the index on the EmployeeName field as well.

4. Close the Access database and exit Microsoft Access.

5. Locate the newly created TimeTrack.mdb file in the C:\Inetpub\wwwroot\TimeTrack folder, and right-click the filename. Choose Properties from the shortcut menu. In the TimeTrack.mdb Properties dialog box click the Security tab, and assign the Read & Execute, Read, and Write permissions to the Everyone group. Click OK to exit the dialog box.

Figure 17-32:

Table tblTimeSheets holds the Summary data from the employee timesheet.

Figure 17-32:

Table tblTimeSheets holds the Summary data from the employee timesheet.

S

tblTimeSheetDetails :

Table

M.-JB

0

Field Name |

Data Type

Description

0

TSheetld

Number

Timesheet Id from tblTimeSheets

DayOfWeek

Text

Day of the Week

CalDate

Date/Time

Date for the specific day of week

RegularHrs

Number

Regular Work Hours

T

Overtime

Number!

jd

Overtime Hours _

M

Field Properties

General 1 Lookup ]

Field Size

Single-

Format

Fixed

Decimal Places

2

Input Mask

Caption

Default Value

0

Validation Rule

Validation Text

Required

No

Indexed

No

Table tblTimeSheetDetails holds the timesheet details.

Figure 17-33:

Table tblTimeSheetDetails holds the timesheet details.

0 0

Post a comment