Serendipityww
Registered User.
- Local time
- Today, 02:14
- Joined
- Sep 6, 2000
- Messages
- 18
This question is separate from previous questions. I am intensely trying to finish up a database and have lots of questions as I have left everything I can't do to the end.
How can I make the following function accommodate courses with anywhere from 3 to 19 tests? I did this one for a course that has 5 tests and started to make a form for the next course and realized that it has 19 tests and that I could probably write one function for all courses if I could figure out what to do with the courses that have less than 19 tests. If the course has only five test, it will only have five controls on the form for entering test grades. Should I put all 19 and just leave some of them blank?
Also, how do I format this function to have two places after the decimal so that whole numbers and decimal numbers line up? I tried the Help illustrations but couldn't get it to work. I appreciate anyone who can help.
Public Function AveragePercentOfFiveTestsTimesPercent(test1, test2, test3, test4, test5, percent) As Double
AveragePercentOfFiveTestsTimesPercent = (test1 + test2 + test3 + test4 + test5) * percent / 5
End Function
How can I make the following function accommodate courses with anywhere from 3 to 19 tests? I did this one for a course that has 5 tests and started to make a form for the next course and realized that it has 19 tests and that I could probably write one function for all courses if I could figure out what to do with the courses that have less than 19 tests. If the course has only five test, it will only have five controls on the form for entering test grades. Should I put all 19 and just leave some of them blank?
Also, how do I format this function to have two places after the decimal so that whole numbers and decimal numbers line up? I tried the Help illustrations but couldn't get it to work. I appreciate anyone who can help.
Public Function AveragePercentOfFiveTestsTimesPercent(test1, test2, test3, test4, test5, percent) As Double
AveragePercentOfFiveTestsTimesPercent = (test1 + test2 + test3 + test4 + test5) * percent / 5
End Function