pictures associated with check box

  • Thread starter Thread starter Guest
  • Start date Start date
G

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..
 
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
 
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 said:
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 said:
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..
 
Hi Jerry,
Its working now. Thanks for your help.

Ravi Junnuru said:
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 said:
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 said:
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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Need help in list box 4
Windows Explorer thumbnails 1
checkbox with many choices 1
Check boxes to text 2
No Pictures,empty box 1
Check boxes to text 1
Ink problem - Canon IP 4000 79
List box - Detect changed value 1

Back
Top