PC Review


Reply
Thread Tools Rate Thread

Changing BackColor

 
 
Sash
Guest
Posts: n/a
 
      9th Sep 2008
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
 
Reply With Quote
 
 
 
 
DaveT
Guest
Posts: n/a
 
      10th Sep 2008
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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the BackColor on a control Cartoper Microsoft C# .NET 2 21st Feb 2008 12:22 PM
Changing backcolor =?Utf-8?B?U2VjcmV0IFNxdWlycmVs?= Microsoft Access 15 6th Aug 2006 05:03 AM
Changing the BackColor of an MDI Form =?Utf-8?B?SmF2?= Microsoft Dot NET Framework Forms 1 28th Oct 2004 11:39 PM
changing BackColor of TabControl Paiam Salavati Microsoft Dot NET Framework Forms 2 26th May 2004 04:06 PM
changing BackColor of TabControl Paiam Salavati Microsoft C# .NET 0 26th May 2004 08:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 PM.