Hello,
If have a question about calculating percentages. Below is the code I used for a form and report. Everything seems to work fine until the percentage equals 20%. When its at 20% the stats reads FAILED. As long as the percentage is over 20%, it will read PASSED. I'm not sure what I need to ensure that if it reads 20% the Status will read PASSED. I do have an '>=' operator as you can see below.
On the Report
[Textstat]
Control Source
=IIf([status]>=[percentage],"FAILED","PASSED")
[Percentage]
Control Source
=IIf([countofcountofroute]=0,"0",[countofcountofroute]/[countofroute1])
---------------------------------------------------
In VBA Mode Code
Case "November"
Me.Text5.Value = "20% OR MORE TO PASS FOR NOVEMBER"
Me.Text7.Value = 20 / 100
--------------------------------------------------
Sample output
ROUTES | YTD TOTAL |20% > | BLANCE | STATUS
66 13 20% 53 Failed
What am I missing?
Thanks. I hope I was clear.
If have a question about calculating percentages. Below is the code I used for a form and report. Everything seems to work fine until the percentage equals 20%. When its at 20% the stats reads FAILED. As long as the percentage is over 20%, it will read PASSED. I'm not sure what I need to ensure that if it reads 20% the Status will read PASSED. I do have an '>=' operator as you can see below.
On the Report
[Textstat]
Control Source
=IIf([status]>=[percentage],"FAILED","PASSED")
[Percentage]
Control Source
=IIf([countofcountofroute]=0,"0",[countofcountofroute]/[countofroute1])
---------------------------------------------------
In VBA Mode Code
Case "November"
Me.Text5.Value = "20% OR MORE TO PASS FOR NOVEMBER"
Me.Text7.Value = 20 / 100
--------------------------------------------------
Sample output
ROUTES | YTD TOTAL |20% > | BLANCE | STATUS
66 13 20% 53 Failed
What am I missing?
Thanks. I hope I was clear.