Change textbox fore color from Control Source property

mixail

Registered User.
Local time
Today, 20:27
Joined
Apr 25, 2010
Messages
18
Hi there,

I'm wondering if this is possible to be done from the control source property of one textbox.

I want to change forecolor of textbox from control source property.

Example:
Control Source:
=IIf(a>b;value "1"+changing textbox forecolor to blue;value "2"+changing textbox forecolor to red))

Regards,
mixail.

P.S.
Sorry.
I use Access 2007
 
Last edited:
Use Conditional Formatting. (Right click on the control.)
 
I can't use Conditional formatting.
When I put in expression that I want the value which is equal to =year(date()) access give an error that I cannot use such expression.
The right example is:
I want one textbox which should contains the chosen working year from company profile.
And if this year is equal to now then textbox value = 2010 and text color to be in blue.
If not let say the chose year is 2011, textbox value is 2011 and text color to be in red.
And all this to be in control source property of that textbox.
Something like this:
=iif(chosen_year=year(date());chosen_year+blue;chosen_year+red)

thanks
 
Conditional Formatting will do the job.

Use the Expression Is condition type.
Enter the whole expression not just the right hand side.

[chosen_year]=year(date())

Add another condition for the next colour etc
 

Users who are viewing this thread

Back
Top Bottom