Code to colour text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I am looking for some code to use when validating a text box. I want to turn
the box red or change a label to red on exit.

Any ideas would be very much appreciated.
Thanks in advance.
 
FJ,
I do not think that the attachment went thru right so I copied and Paste see
below.

Jeff

Hi,

I don't know if it is possible with Access or no but I
want to do is the following:

I want to add a text box or a label or whatever so most
important is to flash for example between Red and Blue,
to tell the user that the current Client didn't pay

Can I do it with Access

Thanks
Add a label to the form.

Code the Form's Current event:
LabelName.BackColor = VbWhite 'or what ever color you want

Set the Form's Timer Interval to 1000.
Set the Form's Timer Event to:

If [SomeControl] = Some Criteria Then
If LabelName.BackColor = vbRed Then
[LabelName].BackColor = vbBlue
Else
[LabelName.BackColor = vbRed
End If
End If
 
Thanks - thats great.
I got a message on another group that was slightly different from this one,
but they both seem to get the desired result.

Thanks very much for your help

F Jones

Jeff said:
FJ,
I do not think that the attachment went thru right so I copied and Paste see
below.

Jeff

Hi,

I don't know if it is possible with Access or no but I
want to do is the following:

I want to add a text box or a label or whatever so most
important is to flash for example between Red and Blue,
to tell the user that the current Client didn't pay

Can I do it with Access

Thanks
Add a label to the form.

Code the Form's Current event:
LabelName.BackColor = VbWhite 'or what ever color you want

Set the Form's Timer Interval to 1000.
Set the Form's Timer Event to:

If [SomeControl] = Some Criteria Then
If LabelName.BackColor = vbRed Then
[LabelName].BackColor = vbBlue
Else
[LabelName.BackColor = vbRed
End If
End If
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
F Jones said:
Hello

I am looking for some code to use when validating a text box. I want to turn
the box red or change a label to red on exit.

Any ideas would be very much appreciated.
Thanks in advance.
 
Back
Top