Results 1 to 4 of 4
  1. #1
    miziri is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    80

    Color change in form filed

    Hi,
    I want in form the color change into red color when I forget to enter the value into that filed.



    thx

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is the BackColor and you would set it in the BeforeUpdate event of your form.

  3. #3
    miziri is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    80
    Hi RuralGuy,

    Can please me code programmer for that


    thank from Iraq country miss peace

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Something like:
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
       If Len(Me.YourControl) = 0 Then
          Me.YourControl.BackColor = RGB(255, 0, 0)
          Cancel = True
       End If
    End Sub
    ...using YourControl name of course.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Color/font change in subform
    By AndyKim in forum Forms
    Replies: 9
    Last Post: 06-24-2009, 04:34 PM
  2. Replies: 1
    Last Post: 03-29-2009, 08:27 AM
  3. Replies: 2
    Last Post: 03-10-2009, 05:14 PM
  4. change cell color
    By bishop743 in forum Programming
    Replies: 0
    Last Post: 02-01-2009, 11:00 AM
  5. Replies: 0
    Last Post: 03-16-2006, 04:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums