Hey, I use code to format the color of a control depending on what dat is in it. Currently it looks like this:
If DLookup("[Team]", "EmployeeLetters", "[LastName] = '" & Me!Mo & "'") = "1" Then Me.Mo.BackColor = T1Color
If DLookup("[Team]", "EmployeeLetters", "[LastName] = '" & Me!Tu & "'") = "1" Then Me.Tu.BackColor = T1Color
I have a lot more of these, plus I would like to use this more, can anybody point me in the right direction of how to handle this.
i'm thinking of making a module that Gives the LastName and get back the colorcode, but I don't really know how to start this.
Thanks,
Richard
If DLookup("[Team]", "EmployeeLetters", "[LastName] = '" & Me!Mo & "'") = "1" Then Me.Mo.BackColor = T1Color
If DLookup("[Team]", "EmployeeLetters", "[LastName] = '" & Me!Tu & "'") = "1" Then Me.Tu.BackColor = T1Color
I have a lot more of these, plus I would like to use this more, can anybody point me in the right direction of how to handle this.
i'm thinking of making a module that Gives the LastName and get back the colorcode, but I don't really know how to start this.
Thanks,
Richard