6 Replies Latest reply on Aug 5, 2011 2:11 PM by pisupportduke

    Changing symbol color on a display with an option box on a form

    pisupportduke

      I have accomplished this task only partly. I was able to change the background symbol (pump) color on my display with an option button on the display its self. I have been unsuccessful on changing the fill color of a symbol from an option button on a form. There should be a way to change the fill color of the symbol because I can make it a multistate symbol and when the certain parameters of that tag are reached, the fill color will change. How do I change the color manually instead of statistically? Below is what I have currently.

       

      1563.q1.gif

       

      The code is for the buttons displayed on the form. This is my code:

       

      Private Sub CommandButton1_Click()
             UserForm1.Show
      End Sub

       

      Private Sub OptionButton1_Click()
            Coolpump_1.BackgroundColor = RGB(255, 0, 0)
      End Sub

       

      Private Sub OptionButton2_Click()
            Coolpump_1.BackgroundColor = RGB(0, 255, 0)
      End Sub

       

      Private Sub OptionButton3_Click()
            Coolpump_1.BackgroundColor = RGB(225, 255, 0)
      End Sub

       

      When I click the "show form" button on the display, my equipment status form shows. I am trying to get those option buttons on the form, to change the fill color of the pump. At minimum the background color of the pump, but I like the idea of the fill color. I tried to move the code from the display option buttons to the form display buttons but the code did not work. What is needed to be done for this to work through a form?

       

      -Alex