. 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


Please Help Members By Posting Answers For Below Questions

what are the facialities provided by you after the selection of the student.

1664


Explain what is a program flowchart and explain how does it help in writing a program?

653


I need previous papers of CSC.......plz help out by posting them.......

1818


Explain the difference between structs and unions in c?

578


How can you call a function, given its name as a string?

716






What is const keyword in c?

753


How do you determine a file’s attributes?

605


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

3299


Can you define which header file to include at compile time?

591


What are the c keywords?

752


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

2244


What is a const pointer?

640


Explain what are multidimensional arrays?

607


What is the difference between a function and a method in c?

565


What do you mean by c what are the main characteristics of c language?

576