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

jimrward

Well-known Member
Joined
Feb 24, 2003
Messages
1,899
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
  8. 2003 or older
Platform
  1. Windows
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
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top