Visibility depending on query

jakoBAlmqvist

Registered User.
Local time
Today, 19:12
Joined
Jun 27, 2005
Messages
26
Hi!

I'm have a query with some fields but only one record. The values in the record depends on comboboxes in a form.

What the query is doing, is that is calculating percentage. So the problem is if you go from zero to something bigger than zero, then this this gives you an infinite value of percentage. I solved that by if it is a zero, then it's changed to null. Then the percentage will be zero.

What I want, or wonder, is if the value is zero, is it possible to to have a textbox or something "lightened up" in a form? What I mean is that if you do your choices in the comboboxes and this gives you a "bad zero" in the query then a text pops up and tells you that "the values are a little bit wrong" or something like that=)

More "shortly" said, can a texts visibility in a form depend on the value in a query?

Hope you understand what I'm trying to say...

Thanks in advance for any help!

-jake
 
You can use conditional formatting. Open the form in design view. Click on the control you want to format. Choose conditional formatting from the menu.
 
Sorry, but I dont understand how to do?! How will it know the value in the query by doing this?

thanks

-jake
 

Attachments

  • Condotional Formatting.GIF
    Condotional Formatting.GIF
    86.3 KB · Views: 124
Last edited:
You're ok so far. You just have to choose some formatting attribute to apply when the condition is true. For example, you can select bold or red or both if you like.
 
Ok! What I hadn't done was to look up the value for the text box. I did a DLookUp("[MyFiled]";"MyQuery") in the control source and then I did the conditional formatting!

Works just as I want it to!

Thanks Hartman!

-jake
 
Just an observation - 2 of your combo boxes have a typo... should be "Quarter" instead of "Quater"
 

Users who are viewing this thread

Back
Top Bottom