Good morning! I am using Access 2003.
I have written a function called ChangeColour that returns either vbRed, vbYellow or vbGreen. My code is:
Debug.Print x returns the appropriate string, however trying to set the colour returns a type mismatch.
Any help would be appreciated, thanks.
I have written a function called ChangeColour that returns either vbRed, vbYellow or vbGreen. My code is:
Code:
Dim x as String
If Not (IsNull(comboProbability.value) Or IsNull(comboImpact.Value)) Then
x = modBgrndColour.ChangeColour(comboProbability.value, comboImpact.Value)
Debug.Print x
Me.txtTitle.BackColor = x
End if
Debug.Print x returns the appropriate string, however trying to set the colour returns a type mismatch.
Any help would be appreciated, thanks.