From: Stefan Hoffmann on 8 Mar 2010 08:58 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 <--
First
|
Prev
|
Pages: 1 2 Prev: Geting travel distance from a map - add-in Next: SELECT FROM Query name |