# Report, use text box value when calculating control source for another text box



## jimrward

New to access but achieved a fair bit, trying to get away from hard coding control source calculations 
my report currently contains 10 labels with 10 associated text boxes, which show performance from 100 to 90 with a tally of said performance over time from my data, the control source is hard coded in each as count(iif([myscore]=100,1,0), then 99 etc
some people have never reached 100
what I would like to do is set textbox1 to the max and each subsequent one would be count(iif([myscore]=[textbox1.value]-1 and cascade down, 
I can’t get the above to work as access keeps prompting me for a value


----------



## Micron

Prompting you for what, [textbox1.value] ? If so, likely because that is not a valid control or field reference. Brackets are use sometime around field/control names but you don't include any properties in that. So maybe [textbox1].value or just [textbox1] since value is the default property anyway.


----------

