Pheliciano
11-28-2010, 08:58 PM
I have a continuous form in my current database that displays a list of records from a table with a check box control next to each record. I want to change the BackColor property of a field control called txtManufacturer when the check box (chkSelected) is selected.
I currently have this code:
Private Sub chkSelector_AfterUpdate()
If Me.chkSelector.Value = True Then
Me.txtManufacturer.BackColor = RGB(255, 0, 0)
Else
Me.txtManufacturer.BackColor = 15987699
End If
End Sub
Unfortunately, when I select one of the checkboxes, the txtManufacturer control for every record on the form turns red.
Does anyone know how I can get the code to manipulate only the instance of the txtManufacturer control that shares the same record as the selected checkbox?
I currently have this code:
Private Sub chkSelector_AfterUpdate()
If Me.chkSelector.Value = True Then
Me.txtManufacturer.BackColor = RGB(255, 0, 0)
Else
Me.txtManufacturer.BackColor = 15987699
End If
End Sub
Unfortunately, when I select one of the checkboxes, the txtManufacturer control for every record on the form turns red.
Does anyone know how I can get the code to manipulate only the instance of the txtManufacturer control that shares the same record as the selected checkbox?