Conditional Color in Form Field Problem

jbruno

Registered User.
Local time
Today, 20:04
Joined
Oct 9, 2001
Messages
19
I have a form in which depending on the status of and item I want the background and font color to change. I've entered the following code into the field and it works. However, it changes the color in that field for all the records not just the current one. How do I make the code update the current field/record while maintaining the correct colors for other records?

Thank you,


Private Sub Color_BeforeUpdate(Cancel As Integer)
Select Case Color
Case "In-Progress (WHITE)"
Me!Color.BackColor = 16777215
Me!Color.ForeColor = 0
Case "Non-FIR Complete (GRAY)"
Me!Color.BackColor = 12632256
Me!Color.ForeColor = 0
Case "Possible Verification Issue (RED)"
Me!Color.BackColor = 255
Me!Color.ForeColor = 16777215
Case "More Information/Clarification Needed (YELLOW)"
Me!Color.BackColor = 65535
Me!Color.ForeColor = 0
Case "Verified, But Past Due Date (BLACK)"
Me!Color.BackColor = 0
Me!Color.ForeColor = 16777215
Case "Verified Complete And On-Time (GREEN)"
Me!Color.BackColor = 4227072
Me!Color.ForeColor = 16777215
End Select
End Sub
 
I didn't know about conditional formatting even being in Access2000.Rich, please share with us where to set this.

Putting the code on the OnCurrent event of the form would solve jbruno's problem too.
 
I don't have A2k so I can't answer your question but it has been answered recently, a search may reveal the post. I also suspect that jbruno might be talking about a continuous form, a different kettle of fish of course.
 

Users who are viewing this thread

Back
Top Bottom