Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you refresh the conditional formatting of a textbox on a form when related field is changed?

Status
Not open for further replies.

rccline

Technical User
Jun 13, 2002
341
US
Using expression [copy]=-1 I have set the conditional formatting set for field [Field1] on my form to display a conditional background color when boolean field [copy]=-1.

How do refresh the conditional formatting to change when the field [copy] changes?

Thank you!

Robert

 
I surprised myself... thanks to Cstuart79 in thread702-1579440, I was able to revise his code to work on my form!
Thank you Cstuart79

Code:
Private Sub Check68_AfterUpdate()
If Me.ActiveControl.Value = True Then
Me.PDFPath.BackColor = RGB(167, 218, 78)

Else
Me.PDFPath.BackColor = RGB(102, 255, 255)
End If
End Sub
 
PS I will rename the checkbox Mr Hookom. In my exuberance of getting this code to work (to my own surprise) I rushed to post. I didn't take time to clean up the code. Going after that now!

Thank you!!

Robert

 
Robert,
You are on your way to self documented coding and keeping my neck hairs from standing ;-)


Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Robert,
You do know that you don't have to reply to your own replay, you can Edit your own post(s), right? :)


---- Andy

There is a great need for a sarcasm font.
 
Andrzejek: I do realize I could have edited or deleted my post. I was thinking that what I discovered might have helped someone else who had the same question.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top