I have a Form which has several Rectangle objects inside. On the same Form I have a subform with the names of the different Rectangles.
I wish that whenever I select a record on the subform, the related Rectangle changes its background color.
On the Master Form (FrmPackages) I have the following code:
Option Compare Database
Dim SkidName As Object
Then on the subform (subFrmSkids) I have the following code:
Private Sub Form_Click()
Set SkidName = TagN° 'Field with name of the rectangle
Forms![FrmPackages].Form.Text165.Value = SkidName
Forms![FrmPackages].Form.SkidName.BackColor = 16755084
When running the DB, as soon as I select a record on the subform (subFrmSkids) I get the following error:
Run-time error '2465'
Application-defined or Object-defined error