Hi,
I have done this in the past, but for the life of me, I can't get the code right.
Main form: frmBC2ndParent
Subform: frmBC2ndChild
When the user clicks a button the the main form, it loads data into the subform through a query. Then it is supposed to check the Combo Box and adjust the background based on the value. Can someone please help me figure out what I am doing wrong?
Thank you!
I have done this in the past, but for the life of me, I can't get the code right.
Main form: frmBC2ndParent
Subform: frmBC2ndChild
Code:
If Me.Form.frmBC2ndChild!Combo173 = "Company Will Pay" Then
Me.Form.frmBC2ndChild!SUPC1.BackColor = vbYellow
Me.Form.frmBC2ndChild!Pack1.BackColor = vbYellow
Me.Form.frmBC2ndChild!Brand1.BackColor = vbYellow
Me.Form.frmBC2ndChild!Manufac1.BackColor = vbYellow
Me.Form.frmBC2ndChild!Broker1.BackColor = vbYellow
Me.Form.frmBC2ndChild!Desc1.BackColor = vbYellow
Else
If Me.Form.frmBC2ndChild!Combo173 = "Vendor Will Bring" Then
Me.Form.frmBC2ndChild!SUPC1.BackColor = RGB(77, 77, 77)
Me.Form.frmBC2ndChild!Pack1.BackColor = RGB(77, 77, 77)
Me.Form.frmBC2ndChild!Brand1.BackColor = RGB(77, 77, 77)
Me.Form.frmBC2ndChild!Manufac1.BackColor = RGB(77, 77, 77)
Me.Form.frmBC2ndChild!Broker1.BackColor = RGB(77, 77, 77)
Me.Form.frmBC2ndChild!Desc1.BackColor = RGB(77, 77, 77)
Else
Me.Form.frmBC2ndChild!SUPC1.BackColor = vbWhite
Me.Form.frmBC2ndChild!Pack1.BackColor = vbWhite
Me.Form.frmBC2ndChild!Brand1.BackColor = vbWhite
Me.Form.frmBC2ndChild!Manufac1.BackColor = vbWhite
Me.Form.frmBC2ndChild!Broker1.BackColor = vbWhite
Me.Form.frmBC2ndChild!Desc1.BackColor = vbWhite
End if
End if
When the user clicks a button the the main form, it loads data into the subform through a query. Then it is supposed to check the Combo Box and adjust the background based on the value. Can someone please help me figure out what I am doing wrong?
Thank you!