By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Yes/No checkbox to control an Image on report/form

P: 3
Base:
Output of qryTest
Expand|Select|Wrap|Line Numbers
  1. Name   order# Food Drink Dessert
  2. Chuks   12    Yes   No     No
  3. Charm   13    No    Yes    Yes
On report, I want to display an image for all yes
Apr 5 '17 #1

✓ answered by NeoPa

That's a little awkward. You don't have an image, nor the address of an image, in your output data so you can't do it directly from your data.

Your easiest solution may be to have the address of the relevant picture(s) in you query output. That way you could have simple code in the OnFormat or OnPrint event that sets the image address to the value of your field. Otherwise your code would have to check the values of the [Food], [Drink] and [Dessert] fields and set the address accordingly.

Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,186
There is no image in your data output so how do you plan to do that?

There are multiple columns that include Yes / No. Which are you referring to?
Apr 5 '17 #2

P: 3
I have unbound images on the report.
I want to display the image of a dish when Food is "yes", glass for drink when its "yes"
Apr 5 '17 #3

P: 3
NeoPa: Thank you for your response. I really appreciate it.

Addition: All images on report are invisible.
I basically want to display a corresponding image of food, drink, and dessert with a yes
Apr 5 '17 #4

NeoPa
Expert Mod 15k+
P: 31,186
That's a little awkward. You don't have an image, nor the address of an image, in your output data so you can't do it directly from your data.

Your easiest solution may be to have the address of the relevant picture(s) in you query output. That way you could have simple code in the OnFormat or OnPrint event that sets the image address to the value of your field. Otherwise your code would have to check the values of the [Food], [Drink] and [Dessert] fields and set the address accordingly.
Apr 6 '17 #5

Post your reply

Sign in to post your reply or Sign up for a free account.