I am looking for some "soulmates", who are working on the subject of Field independant Forms, to start a discussion for further exploration.
In standard Access forms are bound to a RecordSource. In this way the form knows which controls can be used, where to find the values, and where to store the updates.
But the business rules for the controls (user-controls) are must also be applied. For that reason the control has BeforeUpdate and AfterUpdate events to make the control "user friendly", or context specific.
The drawback is that the form is now field dependant, static, and absolutely not shareable.
Workarounds are used to make the forms or the controls more "shareable", with Form classes, or Control classes, but what I read in literature this only benifits in certain niches, and makes code more complex.
I took a different direction, starting with the user-controls.
In a (metadata) Veld_tbl I collect all the business-rules (in FE), and based on that I define the tables and its fields in my development application. This means that - without any form - all information about the behaviour of the user-controls is already available, including the user-controltype, which is far more structured then the fieldtype.
To design a user form, I can just use an dummy form with some dummy controls. During opening of the form the dummy controls are tuned using the information from the Veld_tbl: they are positioned, and diversified according to their task, with a reference to the Veld_tbl.
When an event of a dummy control is triggered, a general procedure handles this event. For example, in the Enter event the "On_ctl_Enter" procedure is run, which activates the appropriate record of the Veld_tbl. When moving to a different control "On_ctl_Exit" procedure is run, handling the business rules, and if necessary, save the changed values. Each control always runs the same procedure per event.
This in a nutshell the process. The same dummy form can be tuned for a complete different task, but with a reference to right Veld_tbl record, the control always reacts in the same way, independant of the form.
As a result, all information on a user-control is stored in a FE-table, and how a table is tuned in a general module.
In this way it is very easy to have an overview over may different applications. No commercial software needed to monitor the different applications. Moreover, almost all underlying processes are generalized (they only need the reference to the Veld_tbl to make them specific) and can be shared in a linked library database.
But much more details can be told about this approach.
Who is really, really, really interested to spit this subject further out?
In standard Access forms are bound to a RecordSource. In this way the form knows which controls can be used, where to find the values, and where to store the updates.
But the business rules for the controls (user-controls) are must also be applied. For that reason the control has BeforeUpdate and AfterUpdate events to make the control "user friendly", or context specific.
The drawback is that the form is now field dependant, static, and absolutely not shareable.
Workarounds are used to make the forms or the controls more "shareable", with Form classes, or Control classes, but what I read in literature this only benifits in certain niches, and makes code more complex.
I took a different direction, starting with the user-controls.
In a (metadata) Veld_tbl I collect all the business-rules (in FE), and based on that I define the tables and its fields in my development application. This means that - without any form - all information about the behaviour of the user-controls is already available, including the user-controltype, which is far more structured then the fieldtype.
To design a user form, I can just use an dummy form with some dummy controls. During opening of the form the dummy controls are tuned using the information from the Veld_tbl: they are positioned, and diversified according to their task, with a reference to the Veld_tbl.
When an event of a dummy control is triggered, a general procedure handles this event. For example, in the Enter event the "On_ctl_Enter" procedure is run, which activates the appropriate record of the Veld_tbl. When moving to a different control "On_ctl_Exit" procedure is run, handling the business rules, and if necessary, save the changed values. Each control always runs the same procedure per event.
This in a nutshell the process. The same dummy form can be tuned for a complete different task, but with a reference to right Veld_tbl record, the control always reacts in the same way, independant of the form.
As a result, all information on a user-control is stored in a FE-table, and how a table is tuned in a general module.
In this way it is very easy to have an overview over may different applications. No commercial software needed to monitor the different applications. Moreover, almost all underlying processes are generalized (they only need the reference to the Veld_tbl to make them specific) and can be shared in a linked library database.
But much more details can be told about this approach.
Who is really, really, really interested to spit this subject further out?