Don't forget that you can always just use one of the eight VBA color
constants such as vbBlack, vbRed, vbGreen, vbYellow, vbBlue, vbMagenta,
vbCyan, vbWhite
ctrlTxt.Backcolor = vbRed
--
Dave Thompson
Allen, TX
US
"Sash" wrote:
> I have the following code (just a snippet, test other fields the same way) to
> change the color of incomplete fields on a continuous form. My issue is that
> the user can move to the next record without fixing the prior and if they
> leave a different field blank that changes all the forms for that field to
> red and you loose whatever what highlighted on the prior. Is there someway
> to not allow them to enter a new record until complete? Oh and this code is
> executed "After Insert"
>
> Dim lgRed As Long
> lgRed = RGB(255, 64, 64)
>
> If IsNull(Item_Number) Then
> MsgBox "Please Complete Item Number"
> Me!Item_Number.BackColor = lgRed
> End If
|