BlueJacket
Registered User.
- Local time
- Today, 10:40
- Joined
- Jan 11, 2017
- Messages
- 90
I want to change the backcolor and fontweight properties of a listbox depending on if it's displaying a record or not, but I'm getting a mismatch error. What should I set my variable as if I'm trying to manipulate these properties?
Code:
Private Sub Form_Current()
Dim stBackColor As String
Dim stFontWeight As String
stBackColor = "#ED1C24"
stFontWeight = "Bold"
If Not Me.lboUpcomingHearings.ListCount = 0 Then
Me![lboUpcomingHearings].BackColor = stBackColor [COLOR="Blue"]<--- Highlighted[/COLOR]
Me![lboUpcomingHearings].FontWeight = stFontWeight
End If
End Sub