G
Guest
I want my subform background to change color if a checkbox is true. The
checkbox is in the subform. I have very minimal experience in vba. Can
someone please provide explicit instructions for this, please? I have gotten
this far:
I placed the following vba in the subform properties, under event - current,
and it works when I open the subform. However; when I open the mainform,
which contains the subform, it no longers works. It gives an error. The
error is listed below the vba statement.
Private Sub Form_Current()
If [Maximo] = True Then
[Forms]![SF-Parts with Vendors subform].Detail.BackColor = 255
Else
[Forms]![SF-Parts with Vendors subform].Detail.BackColor = 12632256
End If
End Sub
Error message is:
Run time error "2450":
Microsoft Access can't find the form "SF-Parts with Vendors subform"
referred to in a macro expression or visual basic code.
checkbox is in the subform. I have very minimal experience in vba. Can
someone please provide explicit instructions for this, please? I have gotten
this far:
I placed the following vba in the subform properties, under event - current,
and it works when I open the subform. However; when I open the mainform,
which contains the subform, it no longers works. It gives an error. The
error is listed below the vba statement.
Private Sub Form_Current()
If [Maximo] = True Then
[Forms]![SF-Parts with Vendors subform].Detail.BackColor = 255
Else
[Forms]![SF-Parts with Vendors subform].Detail.BackColor = 12632256
End If
End Sub
Error message is:
Run time error "2450":
Microsoft Access can't find the form "SF-Parts with Vendors subform"
referred to in a macro expression or visual basic code.