Continuous Form: Change the color of one row

  • Thread starter Thread starter magmike
  • Start date Start date
M

magmike

I have my form set to continuous and have designed the form to look
like a datasheet when there are multiple records. I have the update
event of one of the fields set to change the look of fields based on
the value entered, however, this changes all the rows/records on the
form to the suggested color.

How do I set this just to change the properties of the fields within
the record within that value?

My code:

Private Sub Status_AfterUpdate()
If IsNull(FirstContactDate.Value) Then
FirstContactDate.Value = Date
End If
LastChangeDate.Value = Date
If Me.Status = 54 Then
Me.QuoteReqDate.Value = Date
Me.Address.BackStyle = 1
Me.Address.BackColor = 5615452
Me.Status.BackStyle = 1
Me.Status.BackColor = 515452
Else
Me.Status.BackStyle = 0
Me.Address.BackStyle = 0
End If
End Sub

magmike
 
In Continuous Forms view, there is only one _real_ row; all the others are,
essentially, copies of that row with different values from other records--
so, you cannot _set_ the properties of just one row.

However, you can set the color of the value in a Control by using
Conditional Formatting.

*Why* it should work this way would require some deep understanding of the
thinking of the product group in Redmond. I am willing to just understand
that "It is what it is."
 
Back
Top