. 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.



. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program t..

Answer / 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

More C Interview Questions

while initialization of array why we use a[][2] why not a[2][]...?

0 Answers   Aptech,


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

0 Answers  


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

0 Answers  


What are actual arguments?

0 Answers  


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

0 Answers  






What is use of bit field?

0 Answers  


How can I pad a string to a known length?

0 Answers  


What is difference between scanf and gets?

0 Answers  


How is a structure member accessed?

0 Answers  


how to find string length wihtout using c function?

6 Answers  


What is a nested formula?

0 Answers  


What is the c language function prototype?

0 Answers  


Categories