How do I change the color of a SalesLogix field based on a value in the field?

Question:

I think this is probably something easy to do, but I have no clue.  I want the color of a SalesLogix field to change if the field contains “Retired” from a picklist.  This is for the Satus field on the Account Detail Form.  

I know how to do this with Check Boxes :

Sub chkCODClick(Sender)

    If Sender.Checked Then

      lblCOD.Color = clyellow

    Else

       lblCOD.Color = clBtnFace

    End If

End Sub

However, I don’t know how to accomplish this for a picklist object.

 

Answer:

On the OnChange event for the form just add:

 

Select Case ebYourObject.Text
Case “Retired”
  ebYourObject.Color = vbRed
Case Else
  ebYourObject.Color = clWindow
End Select

Using a case statement simply means you can use more options later – you can use if/else if you want.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!