. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.
Answer Posted / ibtu
Private Sub Form_Load()
02 rs.data source=" & App.Path & "PERSON.mdb"
03 rs.RecordSource = "select * from PERSON"
Dim CountEmp as Integer
CountEmp=0;
rs.MoveFirst
For i = 1 To rs.RecordCount ' Read all the records from database
Name = rs("NAME")
Basic = rs("BASIC")
HRA = rs("HRA")
TotalSal=Basic + Hra ‘Calculate the total salary
If TotalSal> 10000 Then
DISPLAY Name,Basic,Hra,TotalSal ‘Display employee
CountEmp=CountEmp+1 ‘Count the employees with sal >10000
End If
rs.MoveNext
Next i
DISPLAY “No of Employees”,CountEmp
End Sub
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
what are the facialities provided by you after the selection of the student.
Explain what is a program flowchart and explain how does it help in writing a program?
I need previous papers of CSC.......plz help out by posting them.......
Explain the difference between structs and unions in c?
How can you call a function, given its name as a string?
What is const keyword in c?
How do you determine a file’s attributes?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Can you define which header file to include at compile time?
What are the c keywords?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What is a const pointer?
Explain what are multidimensional arrays?
What is the difference between a function and a method in c?
What do you mean by c what are the main characteristics of c language?