Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

pictures associated with check box

Discussion in 'Information Technology' started by Ravi Junnuru, Jul 28, 2006.

  1. Ravi Junnuru

    Ravi Junnuru
    Expand Collapse
    Guest

    Hi,
    I'm having check box with triple state and I want to display pictures with
    each state of the checkbox. Like, if its checked it should show green, if
    unchecked it should show red else it should show black. Is it possible to do
    this? I have created green, red and black jpg pictures using paint.
    Thanks in advance..
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News In Pictures: Hundreds Of Youngsters Attend Sikh Summer Camp - Slough Express Breaking News Aug 13, 2016
    Events Collection Of Rare Historical Pictures From British India History of Sikhism Mar 10, 2015
    Opinion West Punjab : Information Pool and Pictures Punjab, Punjabi, Punjabiyat Nov 18, 2013
    Inspirational Pictures - Yes, Why? Inspirational Stories Oct 28, 2013
    Smartphone pictures pose privacy risks Information Technology Aug 14, 2013

  3. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    Ravi,

    This will depend on how your form and data are structured.

    If all you want to do is display a color, I think you can do this most
    simply without image files, using conditional formatting. Suppose your
    checkbox is called MyCheckBox. Then you could do the following:

    1. Create an unbound text box to display your color.
    2. Select the textbox, and select Format/Conditional Formatting.
    3. Select "Expression Is" in the dropdown on the left.
    4. Enter the following in the box on the right: [MyCheckbox] Is True
    5. Then and select your formatting.
    6. Then click "Add" to create another condition. Select Expression Is"
    and use: [MyCheckbox] Is True and pick a different color.
    7. Click "Add" again and select Expression Is", and use: [MyCheckbox]
    Is Null and a different color.

    If you need to really use images, you can create an image control and
    write code to display the proper image based on the value in the
    checkbox. But this will be complicated if you have a continuous form.

    Jerry


    Ravi Junnuru wrote:
    > Hi,
    > I'm having check box with triple state and I want to display pictures with
    > each state of the checkbox. Like, if its checked it should show green, if
    > unchecked it should show red else it should show black. Is it possible to do
    > this? I have created green, red and black jpg pictures using paint.
    > Thanks in advance..
     
  4. Ravi Junnuru

    Ravi Junnuru
    Expand Collapse
    Guest

    Hi Jerry,
    Thank you for your advice. In the condition its not taking '[checkbox] Is
    True' and giving an error msg "You can use the Is operator only in an
    expression with Null or Not Null".

    "Jerry Porter" wrote:

    > Ravi,
    >
    > This will depend on how your form and data are structured.
    >
    > If all you want to do is display a color, I think you can do this most
    > simply without image files, using conditional formatting. Suppose your
    > checkbox is called MyCheckBox. Then you could do the following:
    >
    > 1. Create an unbound text box to display your color.
    > 2. Select the textbox, and select Format/Conditional Formatting.
    > 3. Select "Expression Is" in the dropdown on the left.
    > 4. Enter the following in the box on the right: [MyCheckbox] Is True
    > 5. Then and select your formatting.
    > 6. Then click "Add" to create another condition. Select Expression Is"
    > and use: [MyCheckbox] Is True and pick a different color.
    > 7. Click "Add" again and select Expression Is", and use: [MyCheckbox]
    > Is Null and a different color.
    >
    > If you need to really use images, you can create an image control and
    > write code to display the proper image based on the value in the
    > checkbox. But this will be complicated if you have a continuous form.
    >
    > Jerry
    >
    >
    > Ravi Junnuru wrote:
    > > Hi,
    > > I'm having check box with triple state and I want to display pictures with
    > > each state of the checkbox. Like, if its checked it should show green, if
    > > unchecked it should show red else it should show black. Is it possible to do
    > > this? I have created green, red and black jpg pictures using paint.
    > > Thanks in advance..

    >
    >
     
  5. Ravi Junnuru

    Ravi Junnuru
    Expand Collapse
    Guest

    Hi Jerry,
    Its working now. Thanks for your help.

    "Ravi Junnuru" wrote:

    > Hi Jerry,
    > Thank you for your advice. In the condition its not taking '[checkbox] Is
    > True' and giving an error msg "You can use the Is operator only in an
    > expression with Null or Not Null".
    >
    > "Jerry Porter" wrote:
    >
    > > Ravi,
    > >
    > > This will depend on how your form and data are structured.
    > >
    > > If all you want to do is display a color, I think you can do this most
    > > simply without image files, using conditional formatting. Suppose your
    > > checkbox is called MyCheckBox. Then you could do the following:
    > >
    > > 1. Create an unbound text box to display your color.
    > > 2. Select the textbox, and select Format/Conditional Formatting.
    > > 3. Select "Expression Is" in the dropdown on the left.
    > > 4. Enter the following in the box on the right: [MyCheckbox] Is True
    > > 5. Then and select your formatting.
    > > 6. Then click "Add" to create another condition. Select Expression Is"
    > > and use: [MyCheckbox] Is True and pick a different color.
    > > 7. Click "Add" again and select Expression Is", and use: [MyCheckbox]
    > > Is Null and a different color.
    > >
    > > If you need to really use images, you can create an image control and
    > > write code to display the proper image based on the value in the
    > > checkbox. But this will be complicated if you have a continuous form.
    > >
    > > Jerry
    > >
    > >
    > > Ravi Junnuru wrote:
    > > > Hi,
    > > > I'm having check box with triple state and I want to display pictures with
    > > > each state of the checkbox. Like, if its checked it should show green, if
    > > > unchecked it should show red else it should show black. Is it possible to do
    > > > this? I have created green, red and black jpg pictures using paint.
    > > > Thanks in advance..

    > >
    > >
     
  6. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    That was my mistake - it should have been:
    [MyCheckbox] = True
     

Share This Page