By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,391 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,391 IT Pros & Developers. It's quick & easy.

Textbox update & Check box = Update link

P: 41
Hello everyone,

I have two forms: FORM1 and FORM2.

On FORM1 there is a check box (CHECK). When CHECK is checked, the data is updated in a YES/NO data type table (TABLE) field.

On FORM2 I have a text box (TEXTBOX).

When the YES/NO data field in TABLE is set to YES (that is to say when CHECK in FORM1 was checked, ie when CHECK = TRUE), I want TEXTBOX to return the text “YES”. Otherwise, I want TEXTBOX to return the text “NO”.

Moreover, I would like “YES” to be in a green colour and “NO” to be in a red colour.

What would be the code to do that?

Please note that FORM1 and FORM2 return several filtered data (I don’t know if this makes a difference in the code…).

I hope I was clear enough.

Thank you for your help.

Best regards,

G.
Jan 8 '07 #1
Share this Question
Share on Google+
6 Replies


Expert 5K+
P: 8,434
Is the textbox on form2 bound? If it is bound to a Yes/No field, perhaps you can get away with just setting the format on the field. As for the red/green, I think Acces can do conditional formatting, something like Excel.
Jan 8 '07 #2

NeoPa
Expert Mod 15k+
P: 31,661
I don't think you have conditional formatting available but setting colours in code - at the same time the value is set can certainly be done.
Jan 9 '07 #3

Expert 5K+
P: 8,434
I don't think you have conditional formatting available but setting colours in code - at the same time the value is set can certainly be done.
D'oh! I had to do the very same thing myself, back around November. What a memory... :o
Jan 9 '07 #4

P: 41
I didn't linked the box actually. So I have done it and it works perfectly !
For the colour, it does exist a conditionnal formating in Access.

Thank you very much for your help ! Appreciated.
Jan 9 '07 #5

Expert 5K+
P: 8,434
I didn't linked the box actually. So I have done it and it works perfectly !
For the colour, it does exist a conditionnal formating in Access.
Hooray! I win. :D

Seriously, glad we were able to help.
Jan 9 '07 #6

NeoPa
Expert Mod 15k+
P: 31,661
As for the colour, Conditional Formatting does exist in Access.
I'll make a note of that thanks.
Jan 9 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.