VB code in Report Modified
I have a report with four fields; NAME,HIV,HBV,HCV,RPR. Apart from the NAME the others represent diseases. In this report each person represented by the NAME would tested for the four (4) disease markers. The result is indicated by either 1 which represents a negative result or 2 which represents a positive result. therefore, if an individual is negative in all the disease markers and another one is say positive for HIV, the report will appear like this;
NAME HIV HBV HCV RPR
Ben 1 1 1 1
Jane 2 2 1 1
Sila 1 2 2 1
etc
Now the task is to calculate the disease prevalence for each disease marker which has tested positive or has 2 indicated. the general formular is e.g for HIV the number of persons tested positive for HIV Divided by the total number of persons tested Multiplied by 100 to get percentage. according to our table one person tested positive to HIV out of the Three. therefore
HIV = 1/3 x 100 = 33%
HBV = 2/3 x 100 = 66%
HCV = 1/3 x 100 = 33%
RPR = 0 = 0%
The above calculations will show the disease prevalence and need to be displayed on the report .
How can I compute the above calculations using VBA Code in the report?
The report gets its values from two other tables the first where the individual results are entered and another where the names and person's IDs are entered
Help?
Bright
Bmulenga
Bmulenga
__________________
Bmulenga
|