S
Secret Squirrel
I'm using the following case select to change the backcolor of some controls
on my report. My question is how can I use just the first character in my
case selects? I'm going to modify my strCaption but the first value will
still be the same as seen below. How can I modify the Cases to just look at
the first character? For example the Case "R" will now be "R - 1". I want it
to still just look at the R and change the backcolor as specified.
If strCaption = vbNullString Then
.Caption = Day(datStartDate)
.Bold = False
Else
.Caption = strCaption
.Bold = True
Select Case strCaption
Case "R"
.BackColor = vbBlue
Case "U"
.BackColor = vbBlue
Case "N"
.BackColor = vbBlue
Case "A"
.BackColor = vbBlue
Case "P"
.BackColor = 39423
Case Else
.BackColor = vbRed
End Select
.ForeColor = vbWhite
End If
on my report. My question is how can I use just the first character in my
case selects? I'm going to modify my strCaption but the first value will
still be the same as seen below. How can I modify the Cases to just look at
the first character? For example the Case "R" will now be "R - 1". I want it
to still just look at the R and change the backcolor as specified.
If strCaption = vbNullString Then
.Caption = Day(datStartDate)
.Bold = False
Else
.Caption = strCaption
.Bold = True
Select Case strCaption
Case "R"
.BackColor = vbBlue
Case "U"
.BackColor = vbBlue
Case "N"
.BackColor = vbBlue
Case "A"
.BackColor = vbBlue
Case "P"
.BackColor = 39423
Case Else
.BackColor = vbRed
End Select
.ForeColor = vbWhite
End If