I'd like to add here some other questions and answers related in a way or another to the same issue. The pointers might lead to my own answer to these questions, but do not hesitate to browse other's answers!
MS Access as enterprise software
Best way to test an MS-Access application
Working with multiple programmers on MS-Access
Recommendations on using SQL server GUIDS from MS-Access
I must admit that one of the main constraints of Access is the limited object model. I was specifically annoyed by the lack of possibilities to add my own properties and methods to the Form object. I recently found an efficient turnaround to this problem by creating 2 extra objects:
the "AllMyForms" object,
which in fact maintain 2 object collections: one is the standard Access forms collection, the other one is a collection of all the instances of the "customForm" object. Both collections are indexed with the hwnd property of an opened form (or, to be more specific, the hwnd property of the instance of a form, allowing me to open multiple instances of the same form).
the "customForm" object,
which lists my custom properties and methods of a form's instance
In this way, I can refer to properties such as:
accessForms:referring to the standard properties and methods
AllMyForms.accessForm(hwnd).name
refers to the .name property of the access form through its .hwnd value
By the way, the following debug.print will then give me the same result:
? screen.ActiveForm.name
? AllMyForms.accessForm().name 'default value for hwnd is screen.activeForm.hwnd'
Custom forms:properties
AllMyForms.customForm(hwnd).selectClause
will refer to the SELECT clause used to create the underlying recordset of the form's instance
Custom forms:methods
The .agregate method, available for a customForm object, will calculate the sum/min/max/avg of a form "column" (ie sum of values for a control in a continuous form):
AllMyForms.customForm().agregate("lineAmount","sum")
Will give me the sum of all "lineAmount" values displayed on the current/active instance of a form.