Needing to calculate percentage in Form

TheTubaGeek

New member
Local time
Today, 12:46
Joined
Jun 18, 2011
Messages
9
(SOLVED) Needing to calculate percentage in Form

I have a Form with multiple text boxes. I was able to pull the numeric values from the queries I have created, but I need to find a way to setup a pair of percentage calculations to fill in the last two fields.

I tried using the following formula:

txtPercentageField = (val(Query1) / val(Query2)) * 100

When I do this, I get an Overflow error. I'd be willing to bet that I need to declare variables/values via Public Functions, but I'm not sure exactly how to do it. Google has not been all that friendly in terms of finding information. :banghead:
 
Last edited:
Please show and/or tell us what Query1 and Query2 represent in your set up.
 
Please show and/or tell us what Query1 and Query2 represent in your set up.
Query2 gives the Total Count, while Query1 is a partial count. I have to use qCount to pull these values for the text boxes.
 
I used the value of the Text Boxes to get my answer:

Code:
txtPercentage = Round((Val(txt01) / Val(txt00)) * 100, 2)
 

Users who are viewing this thread

Back
Top Bottom