Error 2100 while accessing a variable multiple times
Posted on 2003-03-21
In this form I have created, it has several check boxes. When the checkbox is checked a few other things will appear. I need to keep track of how many items are checked. Right now I am using a global variable called Total. Total is either increments or de-increments by one depending if a user is checking or unchecking a box.
I notice that when the form opens, it runs all of the code regardless of an event has actually been executed. In my code I change Total at many different places, but once it hits the seventh one it gives me an error 2100 "The control or subform control is too large for this location."
To better explain this I have the following function:
If d = "-" Then
Total = Total - 1
Total = Total + 1
When ever I need to change this value of Total I call this function. Anyway, at startup, I get this message 7 times with the value of -1 and going to -7. After -7 it shoots that error at me.