a)Â Â Â Create a data sheet in MS Access which includes Employee ID, Employee Name, Father Name, Gender (Male, Female), Age, Date of Joining (dd-mm-yyyy), Address, Cell number (0300-0000000) and City (Karachi, Islamabad, Lahore).
b)Â Â Â Also create its Form and add at least 2 record through the form and create the following queries:
·      List only those employees who belong to the city Karachi.
·      Show only the female employee in the employee table
There should be at least 12 to 15 record in the table.
Please reply as fast as possible
You can use design view or query to create table.
I showed you to create a table using query and then use design view to update constraint.
Go to Create -> Query design -> right click and select SQL View
Execute the following query to create the table
CREATE TABLE Employee(
             EmployeeID INT PRIMARY KEY
             , EmployeeName VARCHAR(100)
             , FatherName VARCHAR(100)
            , Gender VARCHAR(10)
              , Age INT
            , DateOfJoining DATE   Â
              , Address VARCHAR(100)
             , CellNumber VARCHAR(20)
             , City VARCHAR(100)
)
Visual Basic Code:
Option Compare Database
Private Sub btnSubmit_Click()
Dim strSQL As String
strSQL = "INSERT INTO EMPLOYEE (EmployeeID, EmployeeName, FatherName, Gender, Age, DateOfJoining, Address, CellNumber, City ) VALUES (" & txtEmployeeID & ",""" & txtEmployeeName & """,""" & txtFatherName & """,""" & txtGender & """," & txtAge & ",""" & txtDOJ & """,""" & txtAddress & """,""" & txtCell & """,""" & txtCity & """)"
CurrentDb.Execute strSQL
End Sub
Comments
Leave a comment