Change Colour of Text Box in Form

Taffski

Registered User.
Local time
Today, 23:19
Joined
May 10, 2011
Messages
26
Hi,

Newbie to the forum and pretty amateur at Access programming if I was to be completely honest.

My question is probably very basic and I understand the fundamentals of what needs to be done but not the specifics.

I have a database managing questions for a training course, using a form with a text box for displaying question text.

I would like to be able to differentiate between Active and Inactive questions by simply changing the back colour of the box. I have a check box on the form but something more dynamic would be helpful.

Simply: If [Question Active] = YES Then 'White' Else 'Yellow'

I've tried to do it but as I said I am far from being expert in these matters so defer to your greater wisdom for assistance.

Thanks in advance for any help.

Taffski :)


NB. Please remember you are trying to educate an idiot so KIS, please! :confused:
 
You didn't say which version of Access you have but you should be able to use Conditional Formatting. So, with the form in design view, click on the text box you want formatted like that. Then (for 2003 and prior) click on the menu FORMAT > CONDITIONAL FORMATTING and for 2007 and above right click on the control and select Conditional Formatting from the shortcut menu.

Next set the part that says VALUE IS to EXPRESSION IS by selecting it from the dropdown. Next Type this in:

[Question Active] = True

And then set the format by selecting the formatting over to the right of the expression in the Conditional Formatting.

And that is it.
 
Thank you Bob (a) for the speed of response and (b) for solving my problem.

I'm running Access 2010 and had actually tried the conditional formatting but tried the usual Access conditions of Yes/No and 0/1 and didn't think of trying True/False.

What a plonker! :o

Oh well, in my defence, I did claim to idiocy from the off!!!

Thanks again. :)
 
I was always very proud of my army Annual Confidential Reports, which invariably read:

"XXX consistently sets remarkably low standards but nevertheless succeeds in exceeding them at every given opportunity".

Read that whichever way around you will...................... :D

Again, my thanks for your learned assistance. I'm sure our paths will cross on a regular basis. :)
 

Users who are viewing this thread

Back
Top Bottom