G
Guest
I posted this question in the general Access area earlier, but maybe I can
get a better answer in this forum.
I am trying to format the back color of a text box in a form, based on the
value in another text box. If this was Excel it would be easier to use
conditional formatting based onthe value of the second cell, but in A2000
there is no way that I am aware of, other than writing some code. So here is
what I have so far (that does not work):
Dim CAPR As String
CAPR = Text50.Text
If CAPR = "1" Then
txtSiteNum.BackColor = vbBlue
txtSiteNum.ForeColor = vbWhite
Else
txtSiteNum.BackColor = vbWhite
txtSiteNum.ForeColor = vbBlack
End If
I am not sure where there error lies or if this will even work. Any help
would be greatly appreciated.
Larry
get a better answer in this forum.
I am trying to format the back color of a text box in a form, based on the
value in another text box. If this was Excel it would be easier to use
conditional formatting based onthe value of the second cell, but in A2000
there is no way that I am aware of, other than writing some code. So here is
what I have so far (that does not work):
Dim CAPR As String
CAPR = Text50.Text
If CAPR = "1" Then
txtSiteNum.BackColor = vbBlue
txtSiteNum.ForeColor = vbWhite
Else
txtSiteNum.BackColor = vbWhite
txtSiteNum.ForeColor = vbBlack
End If
I am not sure where there error lies or if this will even work. Any help
would be greatly appreciated.
Larry