Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012

    Unanswered: Change label based of field values in cont form

    Hi all

    I want to change the backcolor of a label on a continuous subform based on the values in one of the fields. There are a lot of records most of them you can not see unless you scroll down so I want the user to be able to see that there are records there by the color of the label. I have tried using the on current event of the subform with the following code and it does not work as you would exspect.


    If me.sold > 0 then
    me.lblSold = 4227327
    Else me.lblSold = 12632256
    End If

    Would appreciate any help

    Thanks Bob

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Try conditional formatting on the control (outside of VBA).
    Home | Blog

  3. #3
    Join Date
    Oct 2012

    more specifics

    Hi thanks for the reply. The field I am updating has conditional formating so that when a field has a value > 0 then it changes color this is working very well. Because there are a large number of records sometimes you can not see the values on the form. What I am trying to do is to change the color of the lable itself so that the user will know that there are some records with values > 0 The results I am getting is that when the focus is on a record that has a value the label changes color when the focus is on a record that has no value then the label has the regular color. What I want is the label to change color when any record has a value. I hope I have explained this better this time.

    Thanks Bob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts