Updating a field in parent form from sub-form (1 Viewer)

miacino

Registered User.
Local time
Today, 10:50
Joined
Jun 5, 2007
Messages
106
I am trying to update the background color of a field in my sub-form's parent form.
-------------
Private Sub Combo23_AfterUpdate()

If Me![Status] = "Pending: Waiting for Authorization" Then
Me.Parent.OverallStatus.BackColor = QBColor(6)
End If

End Sub
----------------

It works by updating the field, however, it is not just updating that particular parent field - it is updating the color on ALL records for that field. How do I make it exclusive to just changing the color of the parent field of THAT record?

Also, and less important - is there a color coding better for bright yellow?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:50
Joined
Oct 29, 2018
Messages
21,469
Hi. You'll need to add the same code in the main form's Current event and add an Else branch to reverse the color if the condition is False.
 

miacino

Registered User.
Local time
Today, 10:50
Joined
Jun 5, 2007
Messages
106
Ahhhhh... thank you DB guy!
 

Users who are viewing this thread

Top Bottom