If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form Field/Function problem
I have 4 fields on my main form. The 4th field is controlled by a function.
The function automatically adds the scores from the other 3 fields and puts the total score in the 4th field. All of that works great. The problem I'm having is that I need the color on that 4th field to change if any of the other 3 fields are below 60 points. I've tried adding some code that would change the color, under the 'After Update' and 'After Change' property field and I can't get it to work at all. Thank you in advance for any help! |
#2
|
|||
|
|||
Form Field/Function problem
Place a procedure like this air code in each of the three text boxes that
you total. Private Sub txtOne_AfterUpdate() Dim lngYellow As Long Dim lngWhite As Long lngYellow = RGB(255, 255, 0) lngWhite = RGB(255, 255, 255) If Nz(txtOne.Value) 60 Or Nz(txtTwo.Value) 60 Or Nz(txtThree.Value) 60 Then Me!txtTotal.BackColor = lngYellow Else Me!txtTotal.BackColor = lngWhite End If End Sub "messingerjc" wrote in message news I have 4 fields on my main form. The 4th field is controlled by a function. The function automatically adds the scores from the other 3 fields and puts the total score in the 4th field. All of that works great. The problem I'm having is that I need the color on that 4th field to change if any of the other 3 fields are below 60 points. I've tried adding some code that would change the color, under the 'After Update' and 'After Change' property field and I can't get it to work at all. Thank you in advance for any help! |
Thread Tools | |
Display Modes | |
|
|