Topics Search

If Statement - Change Textbox Color

If Statement - Change Textbox Color
Views: 5
Have spent ages trying to work this out but its really doing my head in haha.

What I have is.
"Datebooked" this is the date we went offsite and installed equipment.
"Returnformdate" This is when I need to send the old equipment return form by which is 8 days.

"Datebooked" has vb to add 8 days and put in "Returnformdate"

What I want to do is after the 8 days make something that is not visable, visable
Sponsored Links:

More topics

 

How to change color on text using IF

Preview
I would like to change color on the text placed in a textbox depending on the value. The value comes from a query connected to a table.

Something like:

in textbox: IF Me.ID = 30 THEN color = #FF0000
ELSEIF Me.ID = 40 THEN color = #00FF00
ELSE color = #000000
 

Change TextBox BackColor to Transparent

Preview
I've seen a lot of messages asking how to pro grammatically change the color of a TextBox to a color, but not on how to do the reverse. If in my form or in my code, I have the BackClolor set to red, how do I pro grammatically change it to be transparent?
 

Change color on text using column value?

Preview
How do I use a value in a column to make a textbox change color? I can explain what I mean:
Right now when a value in a column is supposed to be disabled, I have made the font color grey instead of black using conditional formatting. But this only works with the object it's connected to. So how do I do if I want do use col1 to control the color of col2?
 

Change color on text using column value?

Preview
How do I use a value in a column to make a textbox change color? I can explain what I mean:
Right now when a value in a column is supposed to be disabled, I have made the font color grey instead of black using conditional formatting. But this only works with the object it's connected to. So how do I do if I want do use col1 to control the color of col2?

I use Access 2000.
 

Update label visibility when record changes

Preview
I have a label which I want to set as visible when a textbox is greater than a certain value. When that textbox is less than the certain value, I want the label to not be visible.

I'm able to get it working with a command button using an If statement. With the same If statement, in the On Current event of the form, it will change to visible but when selecting a new record (via combo box) the label will stay, even if the textbox is below a certain value.

How can I get the label to change when selecting a new record like I can with a button? I have a feeling I'm missing something simple with where to put the If statement in some form event.

Working If statement on button:

Private Sub Command99_Click()
If Me.Text_Minutes < 1900 Then
Me.AgentMax.Visible = False
Else
Me.AgentMax.Visible = True
 

Changing bg color of textbox by different values entry

Preview
Here my little problem: I'm using ACCESS 2007 in order to build my first database.
I'd like to change the background color of a textbox "Categories" of my form "Products" if I change the value written in the textbox.
Conditional formatting is not ok for me because I need more than three colors.
I have only six different values I want to enter : A, B, C, D, E, F, and here the six related colors for the background color: green,blue,light blue,yellow,red,light red.
I think that I need some VBA code to write in but I'm a newbie in this field !
Can anyone help and give me the right solution so I'm going to complete my database ?
 

trying to add color to texboxes

Preview
On my forms, I want to have the background color on a textbox change when it is selected, then go back to default when you tab to the next textbox. Is there some generic code that will do this? I have up to 20 txtboxes per tab, and dont want to have to add code specifically for each box.
 

Changing bg color of textbox by entering different values

Preview
I'm using ACCESS 2007 in order to build my first database.
I'd like to change the background color of a textbox "Categories" of my form "Products" if I change the value written in the textbox.
Conditional formatting is not ok for me because I need more than three colors.
Here the six different values I want to enter : A, B, C, D, E, F, and the six related colors for the background : green,blue,light blue,yellow,red,light red.
I think that I need some VBA code to write in but I'm a newbie in this field
 

Checkbox question

Preview
Am new to this forum and fairly new to access but I am needing to have a checkbox, when clicked on a form, change the third character in a four character textbox. I have figured out how to "OnClick" of the checkbox change the color of the textbox in question but can't get the code right to change the text. When it is checked, I need the character to change from whatever it is, to a "G". I know I need to use the Replace function, but that is the extent of my current knowledge
 

Conditional Formatting in Continuous Form

Preview
Conditional formatting is a magical option to change color (background/foreground) of textbox controls on Forms or Report. The color change is possible when one or more field values meets a specific condition. The specific condition can be tested on the field, where we want to set color on or can be based on values in some other field.