I have a report (in Access 97) that needs to print the name in blue if the Last Name is "Smith" and I can do that. However when I also try to get "Jones" to print in blue the "Smith" record goes back to black. Its either every name is in blue or one in blue. I can't find a way to target selected names to be blue.
I'm using this in the detail format event of the report
If me![Last Name] = "Smith" then
me![Last Name].ForeColor = 16711680
Else
Me![Last Name].ForeColor = 0
End If
If me![Last Name] = "Jones" then
me![Last Name].ForeColor = 16711680
Else
Me![Last Name].ForeColor = 0
End If
Work OK for one name. When I repeat the code for Jones then it only work for Jones. It seems to only work for the last code segment. If I don't set the color back to 0 then every last name is blue.
Any suggestions would be much appreciated.
I'm using this in the detail format event of the report
If me![Last Name] = "Smith" then
me![Last Name].ForeColor = 16711680
Else
Me![Last Name].ForeColor = 0
End If
If me![Last Name] = "Jones" then
me![Last Name].ForeColor = 16711680
Else
Me![Last Name].ForeColor = 0
End If
Work OK for one name. When I repeat the code for Jones then it only work for Jones. It seems to only work for the last code segment. If I don't set the color back to 0 then every last name is blue.
Any suggestions would be much appreciated.