Hello,
I have the main form 'frmMain' with a subform, e.g. frmSubform and a few global variables such as 'bAreTextBoxesLocked' (boolean) and 'collcolorThemes' (Collection) in a module. I created a public procedure in this module where I initialize them. Then I need the main form and the sub form to read the variables and set a few controls depending on value of 'bAreTextBoxesLocked', whether it is True or False.
So far I thought the best would be OnOpen event but somehow one of the forms tries to access to the variables before they are set, especially Collection is not set.
Is a solution to this to create one more form 'frmInit' that opens another form after all variables have been set? Or maybe there is a easier/better solution?
Thanks in advance for any help.
I have the main form 'frmMain' with a subform, e.g. frmSubform and a few global variables such as 'bAreTextBoxesLocked' (boolean) and 'collcolorThemes' (Collection) in a module. I created a public procedure in this module where I initialize them. Then I need the main form and the sub form to read the variables and set a few controls depending on value of 'bAreTextBoxesLocked', whether it is True or False.
So far I thought the best would be OnOpen event but somehow one of the forms tries to access to the variables before they are set, especially Collection is not set.
Is a solution to this to create one more form 'frmInit' that opens another form after all variables have been set? Or maybe there is a easier/better solution?
Thanks in advance for any help.