A client wants to have the entries color coded according to designations in a field. The code that I have done is:
if rs("Status")<>"Delete/Cancel" then
' highlight records
if rs("Branch")="KC - 1814 Main St" then
sShadeClass = "style=""background-color:yellow"""
end if
if rs("Branch")="KC - 1737 Main St" then
sShadeClass = "style=""background-color:tan"""
end if
if rs("Branch")="KC - DAD 1814 Main St." then
sShadeClass = "style=""background-color:mediumpurple"""
end if
if rs("Branch")="OP - 10955 Lowell" then
sShadeClass = "style=""background-color:lightgreen"""
end if
if rs("Branch")="OP - 8830 Bond" then
sShadeClass = "style=""background-color:lightblue"""
end if
end if
It works well. The only catch is that they would prefer that the color coding occur in only 1 column. In this case, they want the branch field to be in the designated colors but not the rest. Any ideas how to refine the code to be limited to coloring 1 field?