I have a form which includes a command button (let's call it Main Button) and a subform which has other command buttons (let's call them Sub Buttons). The subform also includes a textbox.
When I click a Sub Button, the textbox in the subform gets a value and turns red and the Main Button's text turns red. I accomplished this with the code:
Code:
Private Sub SubButton_1_Click()
Me.Textbox = 1
Me.Textbox.ForeColor = RGB(170, 0, 0)
Me.Parent.MainButton.Enabled = True
Me.Parent.MainButton.ForeColor = RGB(170, 0, 0)
End Sub
I'm trying to figure out how to get the subform's textbox to change to black when clicking the Main Button in the parent form. I assumed it would be something like:
Code:
Private Sub MainButton_Click()
Me.Judge_1_Subform.Form.AllowAdditions = True
Me.Judge_1_Subform.Requery
Me.MainButton.ForeColor = 12632256
Me.Subform.SubButton.ForeColor = RGB(0,0,0)
End Sub
The last line is wrong. I can't seem to point to the textbox in the subform to alter the color. Is it possible? Can anyone help?
Thanks.