Text Box Conditional Formatting

  • Thread starter Thread starter Lythandra
  • Start date Start date
L

Lythandra

I'm would like to change the background color on a few Text Boxes when a
certain condition is met.

I am using Conditional Formatting which is kinda working. It seems that I
cannot change the background color on a text box if it has a control source.
I am only getting conditional formatting to work if the text box is unbound
and sent to back.

Is that the way it should be or am I doing something wrong?

I'm in Access 2000.
 
I've just used this code to change the label colour if a box is ticked
Private Sub txtwithdrawn_AfterUpdate()
If Me.txtwithdrawn =True Then
Me.txtwithdrawn_Label.ForeColor = 255
End If
End Sub

Could you adapt that?
Cheers
Tony
 
Aye, I tried a varient of that on Form_Current as I may have 1000 lines and
need only the ones that meet the criteria shaded.

Even on Form_Current it was an all or none for shading.

I had used Form_Current to lock or unlock specific items before so I was
surprised it didn't work line by line for shading also.
 
Lythandra said:
I'm would like to change the background color on a few Text Boxes when a
certain condition is met.

I am using Conditional Formatting which is kinda working. It seems that I
cannot change the background color on a text box if it has a control source.
I am only getting conditional formatting to work if the text box is unbound
and sent to back.

Is that the way it should be or am I doing something wrong?

I'm in Access 2000.


You must be doing something wrong. Perhaps you are using
the wrong condition, the wrong kind of condition or the
condition is typed incorrectly???

If you can post the CF settings that you are using and
explain what "certain condition" you want to use, someone
can probably unravel it for you.
 
I got it done now.

I was using a calculation in an unbound field and it didn't like that.

I switched the calculation to the query and then stuck in the field normally
and it likes it fine now.
 
Lythandra said:
I got it done now.

I was using a calculation in an unbound field and it didn't like that.

I switched the calculation to the query and then stuck in the field normally
and it likes it fine now.

That should work too.

The only thing I can think of that's different about using a
text box name in a CF expression is that you must enclose it
in [ ]
 
Back
Top