I have created a database in Access. This is how I set my workflow.
- Created 'fields' table.
- Gave each field their unique column name (ie. Project Team field has Fld10078 field ID)
- Created 'ticket' form
- Produced report that has a 'ticket' card looking layout with desired fields layed at desired place.
- Each project team on the 'ticket' has their own color.
Before I came, this was already coded and was working fine. Each project team has its own unique color. I wanted to add 2 new teams with their unique colors but it's now showing up. Only the first 4 teams would show color on ticket card.
Here's the code:
Select Case Me.Fld10078
Case "Team A"
Me.Fld10078.BackColor = RGB(204, 0, 0)
Me.Fld10078.ForeColor = vbWhite
Case "Team B"
Me.Fld10078.BackColor = RGB(51, 102, 255)
Me.Fld10078.ForeColor = vbWhite
Case "Team C"
Me.Fld10078.BackColor = RGB(0, 153, 0)
Me.Fld10078.ForeColor = vbWhite
Case "Team D"
Me.Fld10078.BackColor = RGB(255, 153, 0)
Me.Fld10078.ForeColor = vbWhite
Case "Team E"
Me.Fld10078.BackColor = RGB(204, 0, 0)
Me.Fld10078.ForeColor = vbWhite
Case "Team M"
Me.Fld10078.BackColor = RGB(0, 128, 128)
Me.Fld10078.ForeColor = vbWhite
Case Else
Me.Fld10078.Visible = False
End Select
Here's what I have for control source:
=IIf([Fld10078]="Team A","Team A",IIf([Fld10078]="Team B","Team B",IIf([Fld10078]="Team C","Team C",IIf([Fld10078]="Team D","Team D",IIf([Fld10078]="Team E","Team E",IIf([Fld10078]="Team M","Team M"))))))
Team E and Team M are not showing colors. They are showing text but not colors.