You can use DCount("*", "TestTable")
directly!
Why set a global variable?!
In the percentage textbox ControlSource
property should be:
=(Count(*)/DCount("*", "TestTable")) * 100
BTW: If you set the Format
property to Percent
you can miss out the * 100
FYI: In order to access global variables from a ControlSource
property you must use a function that returns the value of the global. Globals themselves are not accessible.