Color box in details of a form

vagelisr

Registered User.
Local time
Today, 11:03
Joined
Apr 28, 2011
Messages
87
Hi to all
I want to add a color box or whatever you think is easyest and when i open a form in every detail line read from another table and if the date diff is less than 30 days change to orange and if the date diff is less then 10 change to red.

Any idea how i can do something like this???

I don't know what to add in the detail line (I have add a rectangle) and how i perform the code i want in every detail line.

I hope you do not confuse

Thanks and regards.
 
Use a textbox and then look at Conditional Formatting, on the ribbon.
 
First of all thanks for your quick answer.
The point is. I have to read for every detail line another table.
How can i do something like this?
 
Not knowing the specifics, offhand I'd say to get that value in a query that the form is based on or use DLookup().
 
I have a field name Min_Expire.

I want in the Conditional Formatting when the date less than 30 days color change to orange

I have try [Min_Expire]< DateAdd("d", 30, Now()) but did not work

PLEASE HELP!!!!!!!!!!!!!!!!!!!!
I'm using access 2003
 
Can you attach the db here? That looks like it should work as an expression.
 
Form Gun_Header
Last field

If the Min_Expire < 30+ Now change the color to orange.


Thank yoy very much.
 

Attachments

What you have appears to be working, as does the formula above. The third record is highlighted, which seems appropriate to the data.
 
The 3rd record is red and is less than Now()
I want if the same field is less than 30 + now the color be Orange or yellow......
 
Ah, you want a second rule. First is

[min_expire]<Date()

color red, second is:

[Min_Expire]<DateAdd("d",30,Now())

color orange.
 
As i told you i had already try this and they did not accepted.

But as an idea yes this is what i want....
 
It is working for me.
 

Attachments

  • Format.jpg
    Format.jpg
    50.2 KB · Views: 81
Did you have any idea why it is not working for me??

I use access 2003 with SP3
 
No, the sample didn't contain the second condition. I have 2010 on this computer, but that shouldn't be a factor.
 

Users who are viewing this thread

Back
Top Bottom