Look for advice in architecture VBA Access
Posted on 2011-10-14
I have created a class, named Tables_Support in VBA, which serves to access to the different tables to access with a collection of useful functions like (Microsoft Access):
Record(table selected, item)
Delete(table selected, item)
Determine_Color(table_selected): serves for conditionnal_presentation in the formular
This class contains workspace , database and recordset among lot of variables (integer string etc...)
The problem is that I create a lot of instance of this class but I never know when to delete it:
If I create it just in the Form_load function of the formular, a bug arises cause the conditional presentation of Access call Determine color before the loading of the formular. So I created a TS instance before the form is launched.
I never destroy instances cause I don't know really when and how.
Could you provide me some idea?
thanks in advance!