In my Access database I have a global variable (Global allowEditing as Boolean
) defined in a module (Main). I set this variable, then I want to use it later at the form level to disable some buttons. I'm having trouble with this.
For Each ctl In Me.Controls
ctl.Enabled = False 'Works for True or False
ctl.Enabled = allowEditing 'Throws error
Next
The error thrown is:
Run-time error '438': Object doesn't support this property or method.
Whats happening here and how can I use the boolean value?