Text Box Conditional Formatting

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.
 
T

Tony Williams

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
 
L

Lythandra

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.
 
M

Marshall Barton

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.
 
L

Lythandra

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.
 
M

Marshall Barton

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 [ ]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top