What would be the code if the log book is maintained by the secretary of the company to calculate and manage the leave days taken by the employees. The secretary is able to view the information of an employee except their salary remuneration. The basic principle of the company is that each employee is allowed to take 30 days of paid leave per annum. The system does not allow an employee to take more than 30 days of leave.

You want to calculate and manage the leave days taken by the employees.
For storing information first you must make a database.Store it in your project folder.Create 2 table , one to store employees details and other to store the total present days or a Registry to record the present employees And then
connect the database

Dim dn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim RS1 As New ADODB.Recordset
Public id As Integer

dn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Emp_DATABASE.mdb;Persist Security Info=False"
rs1.Open "select * from MASTER_TABLE", dn, adOpenDynamic, adLockOptimistic
rs.Open "select * from Leave_Day " , dn, adOpenDynamic, adLockOptimistic

To enter an employee details create some text boxes and one button and add this code in button control...

If Len(Name.text) = 0 Then
    MsgBox "Please Enter Receiver name", vbInformation, "Enter All the Details..."
Else
    rs.AddNew
    rs.Fields(0).Value =ID.text
    rs.Fields(1).Value = Name.text
    rs.Fields(2).Value = Job.text
    rs.Fields(3).Value = Salary.text
    rs.Update
'To call or get a value then use this 

ID.Text = rs.Fields(0).Value
Name.Text = rs.Fields(1).Value
Job.Text = rs.Fields(2).Value

To restrict a special user in data accessing then you must set a login control.For this you need to create a user database and create a login with some criteria.When creating a user add an additional field to check the authority of user.Then if the login user is secretary then disable the power to edit and alter the employees files or do what you want...

To control the leave details first create a Leave_Day Table and connect it , add fileds named total leaves and current leaves , leaves taken these fields are must.
And set a form like Employees registry.Then it is necessary to record employee' s status.
In this registry form when the user enter employee id then search the databases and retrieve that particular employee details and show the ID , Name , Leaves Taken ...and 2 option control to check the status [ present or absent ]. If he entering the status as absent then check the total leaves taken by him.If it equals or greater than then warn the user. or else then use the code to add the status to database.

Try it ...
Here i used MS Access .
Best of Luck ....

codes for calling articles from drive E to the interface

Hai Vinith! I watched ur prgm. I need some suggestion for my project. Can u help me. The theme of my project is to making Diary writing as Computerized. Entering the day to day memories & save it with password protection. I've to store the information in the backend MSAccess. Can u help me to finish my project... Please reply soonly...

Hai Vinith! I watched ur prgm. I need some suggestion for my project. Can u help me. The theme of my project is to making Diary writing as Computerized. Entering the day to day memories & save it with password protection. I've to store the information in the backend MSAccess. Can u help me to finish my project... Please reply soonly...

I think you need to open a new thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.