Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    54

    Unanswered: Set_item_property problem

    Dear all

    I have a field on my form. I want that values of this field will compare with field2 on form. If Value is less then or greater than field2 then color will set to red and if values equal to field2 then color set black.

    I created a trigger like this:

    if :distb_tot<:inv_tot or :distb_tot>:inv_tot then
    set_item_property ('distb_tot',foregroundcolor_red);
    else
    set_item_property ('distb_tot',foregroundcolor_black);

    but its not compiling.

    any one can help me?

    Wasim

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    do you have an end if? What exactly is the error being reported. I'm good, but I can't read minds.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Simply, SET_ITEM_PROPERTY syntax is wrong.

    It doesn't cost much to open Forms Online Help system and search for the proper use, does it?

    If you want to color it "red", you'll have to use red colour's RGB value (it would be R255G0B0), not colour name. So, something like this might do the job:
    Code:
    SET_ITEM_PROPERTY('item_name', foreground_color, 'r255g0b0');

Posting Permissions

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