hi Peter,
I'm looking for a simple way to check that the text entered into a text box
contains a slash at the end. I'm assuming VBA that executes On_Exit.
You may use a input mask or use this in your event:
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.
mfG
--> stefan <--