SECTION B - Microsoft Access

Answer 1 question only

Question 4

The table named "staffinfo" has the following structure:

\begin{tabular}{|c|c|c|}
\hline Field name & Data type & Description \\
\hline Sid & Autonumber & Staff identification number \\
\hline Department & Text & Department (e.g., teller dept., administration dept., store dept., maintenance dept., marketing dept.) \\
\hline Sname & Text & Staff name \\
\hline Address & Text & Address of staff \\
\hline Sphone & Text & Staff phone \\
\hline Post & Text & Post (e.g., junior teller, cashier, accountant, manager) \\
\hline Dol & Date/time & Date of joining \\
\hline Sdob & Date/time & Staff date of birth \\
\hline
\end{tabular}

b. Create a form on the basis of the "staffinfo" table and save it as "entryform".

c. Fill in at least 5 records using the "entryform".

d. Create a query named "depinfo" to display records including department name, staff name, and mobile number.

e. Create a query named "post" to display staff name, post, department, and phone number where the post is "teller" or "cashier".

f. Prepare a report based on the query named "depinfo".



Answer :

Sure, let's break down each part of the task step-by-step:

### a. Table "staffinfo" Structure
1. Field Name: Sid
- Data Type: Autonumber
- Description: Pley Staff identification number

2. Field Name: Department
- Data Type: Text
- Description: Department like teller dept., administration dept., store dept., laim dept., marketing dept.

3. Field Name: Sname
- Data Type: Text
- Description: Staff name

4. Field Name: Address
- Data Type: Text
- Description: Address of staff

5. Field Name: Sphone
- Data Type: Text
- Description: Staff phone

6. Field Name: Post
- Data Type: Text
- Description: like junior teller, casher, accountant, managerate

7. Field Name: Dol
- Data Type: Date/time
- Description: Date of joined

8. Field Name: Sdob
- Data Type: Date/time
- Description: Date of birth

### b. Create Form "entryform"
1. Open Microsoft Access.
2. Go to "Create" tab.
3. Click on "Form Wizard".
4. Choose the "staffinfo" table.
5. Select all fields to be included in the form.
6. Click "Finish" to generate the form and save it as "entryform".

### c. Fill Records Using "entryform"
Using the "entryform", enter the following records:
1. Record 1
- Sid: 1
- Department: "Teller Dept"
- Sname: "John Doe"
- Address: "123 Main St"
- Sphone: "555-1010"
- Post: "Junior Teller"
- Dol: "2023-01-15"
- Sdob: "1990-04-22"

2. Record 2
- Sid: 2
- Department: "Admin Dept"
- Sname: "Jane Smith"
- Address: "456 Oak St"
- Sphone: "555-2020"
- Post: "Accountant"
- Dol: "2023-02-05"
- Sdob: "1985-06-15"

3. Record 3
- Sid: 3
- Department: "Store Dept"
- Sname: "Michael Brown"
- Address: "789 Pine St"
- Sphone: "555-3030"
- Post: "Casher"
- Dol: "2023-03-10"
- Sdob: "1992-08-30"

4. Record 4
- Sid: 4
- Department: "LaimDept"
- Sname: "Emily White"
- Address: "321 Birch St"
- Sphone: "555-4040"
- Post: "Managerete"
- Dol: "2023-04-25"
- Sdob: "1988-11-11"

5. Record 5
- Sid: 5
- Department: "MarketingDept"
- Sname: "David Green"
- Address: "654 Maple St"
- Sphone: "555-5050"
- Post: "Junior Teller"
- Dol: "2023-05-12"
- Sdob: "1995-09-25"

### d. Create Query "depinfo"
1. Go to the "Create" tab.
2. Click on "Query Design".
3. Add the "staffinfo" table to the query.
4. Select the fields "Department", "Sname", and "Sphone".
5. Save this query as "depinfo".

### e. Create Query "post"
1. Go to the "Create" tab again.
2. Click on "Query Design".
3. Add the "staffinfo" table to the query.
4. Select the fields "Sname", "Post", "Department", and "Sphone".
5. In the "Criteria" row under the "Post" field, enter:
```
"teller" OR "casher"
```
6. Save this query as "post".

### f. Create Report Based on "depinfo"
1. Go to the "Create" tab.
2. Click on "Report Wizard".
3. Choose the query "depinfo".
4. Select the fields "Department", "Sname", and "Sphone".
5. Follow the prompts to complete the report creation and save the report.

And there you have it! This complete process will satisfy all the requirements of the given question.