Angeletino
April 16th, 2001, 11:00 PM
They ask me to do this project
Please read carefuly and Help me what you can and want.
thankx
1. Create a project to process payroll information for Ace Industries Inc.
2. Project has to use at least 3 forms: Payroll form, DataEntry form and Salary form (feel free to add other forms and standard modules.)
3. Create a sequential file and call it Employee. Each record will contain fields for first name, last name, hourly pay rate and amount earned. Starting the project will load the employee data into an array of userdefined types from the sequential file.
4. DataEntry form allows adding new employee to the file and printing the list of all Ace Industries Inc employees and their rates. (Supposed all of them have different first names ).
5. Salary form retrieves salary information including first name, last name, pay rate, worked hours, overtime and salary. Overtime counts as worked hours over 40. Employees receive for overtime timeandahalf pay. The user has a choice to include salary information in the report or ignore it.
6. Payroll Form
a) Allows switching to the DataEntry form.
b) Allows selecting any employee
c) Allows finding any employee using employee first name
d) Allows calculating of a salary and printing report.
7. Add to the Payroll form FindPay command button or menu command for calculating salary. It has to be accessible only after selecting any employee. Use InputBox to enter worked hour's information.
8. Printing report should contain the list of first and last names, worked hours and overtime hours, pay rate, salary and total amount earned for all employees.
9. First name, last name, hourly pay rate and amount earned have to be automatically saved in the Employee file.
10. For self-checking use this table:
Employee Name Hours Worked Hours Overtime Pay rate Amount Earned
Janice Jones 40 0 5.25 210.00
Chris O’Connell 35 0 5.35 187.25
Karen Fish 45 5 6.00 285.00
Tom Winn 42 2 5.75 247.25
This is my code so far
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Option Explicit
Private Type worker
FName As String * 15 ' only 15 characters
LName As String * 15 ' only 15 characters
End Type
Dim NewWorker(1 To 50) As worker
Private Sub cmdAdd_Click()
Open "a:\Students.txt" For Append As #3
With NewWorker(3)
.FName = txtFirst.UBound
.LName = txtLast.UBound
Write #3, .FName, .LName
End With
Close #3
End Sub
Private Sub cmdInput_Click()
Dim i As Integer
Dim Counter As Integer
i = 1
Open "a:\Students.txt" For Input As #3 'open file
Do Until EOF(3)
With NewWorker(i)
Input #3, .FName, .LName
i = i + 1
End With
Loop
Close
Counter = i - 1
For i = 1 To Counter 'retrieve information from aour counter to our list box
With NewWorker(i)
List1.AddItem .FName & .LName
End With
Next
End Sub
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
Can someone help me the List1.AddItem doesn't work and this is getting me CRAZYYYYY
Please some help
angeletino@hotmail.com
Please read carefuly and Help me what you can and want.
thankx
1. Create a project to process payroll information for Ace Industries Inc.
2. Project has to use at least 3 forms: Payroll form, DataEntry form and Salary form (feel free to add other forms and standard modules.)
3. Create a sequential file and call it Employee. Each record will contain fields for first name, last name, hourly pay rate and amount earned. Starting the project will load the employee data into an array of userdefined types from the sequential file.
4. DataEntry form allows adding new employee to the file and printing the list of all Ace Industries Inc employees and their rates. (Supposed all of them have different first names ).
5. Salary form retrieves salary information including first name, last name, pay rate, worked hours, overtime and salary. Overtime counts as worked hours over 40. Employees receive for overtime timeandahalf pay. The user has a choice to include salary information in the report or ignore it.
6. Payroll Form
a) Allows switching to the DataEntry form.
b) Allows selecting any employee
c) Allows finding any employee using employee first name
d) Allows calculating of a salary and printing report.
7. Add to the Payroll form FindPay command button or menu command for calculating salary. It has to be accessible only after selecting any employee. Use InputBox to enter worked hour's information.
8. Printing report should contain the list of first and last names, worked hours and overtime hours, pay rate, salary and total amount earned for all employees.
9. First name, last name, hourly pay rate and amount earned have to be automatically saved in the Employee file.
10. For self-checking use this table:
Employee Name Hours Worked Hours Overtime Pay rate Amount Earned
Janice Jones 40 0 5.25 210.00
Chris O’Connell 35 0 5.35 187.25
Karen Fish 45 5 6.00 285.00
Tom Winn 42 2 5.75 247.25
This is my code so far
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Option Explicit
Private Type worker
FName As String * 15 ' only 15 characters
LName As String * 15 ' only 15 characters
End Type
Dim NewWorker(1 To 50) As worker
Private Sub cmdAdd_Click()
Open "a:\Students.txt" For Append As #3
With NewWorker(3)
.FName = txtFirst.UBound
.LName = txtLast.UBound
Write #3, .FName, .LName
End With
Close #3
End Sub
Private Sub cmdInput_Click()
Dim i As Integer
Dim Counter As Integer
i = 1
Open "a:\Students.txt" For Input As #3 'open file
Do Until EOF(3)
With NewWorker(i)
Input #3, .FName, .LName
i = i + 1
End With
Loop
Close
Counter = i - 1
For i = 1 To Counter 'retrieve information from aour counter to our list box
With NewWorker(i)
List1.AddItem .FName & .LName
End With
Next
End Sub
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=
Can someone help me the List1.AddItem doesn't work and this is getting me CRAZYYYYY
Please some help
angeletino@hotmail.com