How do I run a module in a report field...

G

Guest

I have set up a public function called...
Public Function Total_Weight(X) As Integer
'updated 02/08/05
If IsNull(X) Then
Total_Weight = 0
ElseIf X < 91 Then
Total_Weight = 0
ElseIf X < 92 Then
Total_Weight = 0.01
ElseIf X < 93 Then
Total_Weight = 0.02
.........
ElseIf X < 115 Then
Total_Weight = 0.24
Else
Total_Weight = 0.25
End If
End Function

I have a text box that sums the scores of 5 other text boxes and it is named
"Total_Weight".

The field I want to populate with this function is called "Bonus Percent".

I have exhausted all my ways of getting this to work so hopefully one you
experts can help me out.

Thanks,
Chris
 
G

Guest

Never mind!!! Boy do I feel STU-PID. It helps when you use Double instead
of Integer when dealing with percents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top