Conditional formatting based on a different text box

G

Guest

I'm doing conditional formatting in a continuous form. I need to base the
format of the text box on a particular value being present in a different
text box.

I was inclined to try

Expression Is me!txtMeal="breakfast"

being the condition set for the text box I wanted to format with me!txtMeal
being a different text box on that continuous form.

No dice. I know I've done this before, but I cannot for the life of me
remember how I did it!

What did I overlook, please?

mille grazie
 
J

John Vinson

I'm doing conditional formatting in a continuous form. I need to base the
format of the text box on a particular value being present in a different
text box.

I was inclined to try

Expression Is me!txtMeal="breakfast"

being the condition set for the text box I wanted to format with me!txtMeal
being a different text box on that continuous form.

No dice. I know I've done this before, but I cannot for the life of me
remember how I did it!

What did I overlook, please?

Leave off the Me! - it applies only in VBA code, not in form
properties. Be sure to use [txtMeal] otherwise it will assume you mean
text string - and "txtMeal" will never be equal to "Breakfast"!

John W. Vinson[MVP]
 
F

fredg

I'm doing conditional formatting in a continuous form. I need to base the
format of the text box on a particular value being present in a different
text box.

I was inclined to try

Expression Is me!txtMeal="breakfast"

being the condition set for the text box I wanted to format with me!txtMeal
being a different text box on that continuous form.

No dice. I know I've done this before, but I cannot for the life of me
remember how I did it!

What did I overlook, please?

mille grazie

Me! is not an Access keyword, but a VBA keyword, so ...
Expression Is [txtMeal] = "breakfast"
should work.
 
G

Guest

D'oh!!!

It's always the little things, ain't it?

John Vinson said:
I'm doing conditional formatting in a continuous form. I need to base the
format of the text box on a particular value being present in a different
text box.

I was inclined to try

Expression Is me!txtMeal="breakfast"

being the condition set for the text box I wanted to format with me!txtMeal
being a different text box on that continuous form.

No dice. I know I've done this before, but I cannot for the life of me
remember how I did it!

What did I overlook, please?

Leave off the Me! - it applies only in VBA code, not in form
properties. Be sure to use [txtMeal] otherwise it will assume you mean
text string - and "txtMeal" will never be equal to "Breakfast"!

John W. Vinson[MVP]
 

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