Let me try this again...
On a form I will have a dozen or more checkboxes that determine if specific documents are required for this client. Each checkbox will have "associated" with it one or more other controls that hold data about when that document was sent, received, the score, etc.
The goal is to have the checkbox's AfterUpdate event Sub set the .enabled value of the associated controls ("Friends") on or off to match the checkbox's status.
OK, easy with the normal checkbox object's AfterUpdate event. BUT with a dozen such objects on the form that requires a dozen separate Subs.
The authors of Microsoft Access 2010 Programmer's Reference suggest creating a subclass of the standard checkbox object which allows you to add another parameter (.Friends) which is an array of the form's controls that are associated with each instance of the checkbox object.
Here's where I'm stuck
First when assigning the array of objects to the subclassed checkbox object's .Friends parameter (error msg)
Second I'm not sure I'm passing the associated object reference in the right way so as to be able to use them in my code.
A stripped down example database is attached.
On a form I will have a dozen or more checkboxes that determine if specific documents are required for this client. Each checkbox will have "associated" with it one or more other controls that hold data about when that document was sent, received, the score, etc.
The goal is to have the checkbox's AfterUpdate event Sub set the .enabled value of the associated controls ("Friends") on or off to match the checkbox's status.
OK, easy with the normal checkbox object's AfterUpdate event. BUT with a dozen such objects on the form that requires a dozen separate Subs.
The authors of Microsoft Access 2010 Programmer's Reference suggest creating a subclass of the standard checkbox object which allows you to add another parameter (.Friends) which is an array of the form's controls that are associated with each instance of the checkbox object.
Here's where I'm stuck
First when assigning the array of objects to the subclassed checkbox object's .Friends parameter (error msg)
Second I'm not sure I'm passing the associated object reference in the right way so as to be able to use them in my code.
A stripped down example database is attached.
Attachments
Last edited: