. 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
Why do we need functions in c?
Should a function contain a return statement if it does not return a value?
What are the application of void data type in c?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
What is void pointers in c?
What is spaghetti programming?
With the help of using classes, write a program to add two numbers.
Is void a keyword in c?
What is ponter?
write a programming in c to find the sum of all elements in an array through function.
What is the use of header?
Explain how do you determine the length of a string value that was stored in a variable?
What are the primitive data types in c?
What is character constants?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.