From: Stefan Hoffmann on
hi Stefan,

On 08.03.2010 14:45, Stefan Hoffmann wrote:
> Const COLOR_LIGHTBLUE As Long = 15713933
> Const COLOR_WHITE As Long = 16777215
>
> Dim length As Long
>
> length = Len(Trim(Nz(txtYourControl.Value, "")))
> If (length > 0) And _
> (Mid(txtYourControl.Value, length, 1) <> "-") Then
> txtYourControl.BackColor = COLOR_LIGHTBLUE
> Else
> txtYourControl.BackColor = COLOR_WHITE
> End If
>
> btw, I would use the On Change event.
In this case you must use txtYourControl.Text instead of
txtYourControl.Value,


mfG
--> stefan <--