conditional formatting on form (1 Viewer)

jamesmor

Registered User.
Local time
Yesterday, 21:23
Joined
Sep 8, 2004
Messages
126
I'm having some issues with conditional formatting on a form in datasheet view.

The control in question is an unbound textbox.

I have the following formatting set up:

If field value between 25 and 29 turn the backcolor yellow

if field value greater than or equal to 30 turn the backcolor red, font color white

In my testing the yellow works like it should. The red I'm having problems with.

If I enter 4, 5, 6, 7, 8, or 9 in the text box it turns red.

If I enter 04, 05, 06, 07 , 08 , 09 in the text box it doesn't apply any formatting.

Is there something I'm missing with conditional formatting where 4 > 30 somehow?

Or is there something else I should be doing?

Thanks

Nathan
 

Trevor G

Registered User.
Local time
Today, 03:23
Joined
Oct 1, 2009
Messages
2,341
What data type are you using for the Field and with what Properrties?
 

jamesmor

Registered User.
Local time
Yesterday, 21:23
Joined
Sep 8, 2004
Messages
126
not sure I understand for data type. I just added a text box to the form, has no formatting, and is unbound.

I don't see any where I could specify a data type in the properties window.

Other than changing the name of the control I actually haven't changed any of the default properties at all.
 

Trevor G

Registered User.
Local time
Today, 03:23
Joined
Oct 1, 2009
Messages
2,341
Sorry miss read that it is unbound.

Open the form in design view then select the field and then use right button and select properties, then in the properties look at the format and change to General Number format, that should then allow the 0 (Zero) if not then you need to play around with the format. If you haven't formatted the text box property it then is text.....
 

jamesmor

Registered User.
Local time
Yesterday, 21:23
Joined
Sep 8, 2004
Messages
126
so I set the format to general number, standard number, and fixed number, they all display the same behavior.

the only condition set is that if the value in the field is >= 30 then back color is red and font color is white.

The only difference is that if I actually set the format then Access clears the leading 0, where if I leave format blank then the leading 0 will stay.


Using Access 2003 SP3
 

Users who are viewing this thread

Top Bottom