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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any tips on making color formatting easier

Status
Not open for further replies.

rperre

Programmer
Jan 25, 2005
39
US
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
 
I guess I gave my own answer, I just put it in a module and call it, works like a charm!

Sorry,

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top