Results 1 to 4 of 4
  1. #1
    avarusbrightfyre is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Sep 2009
    Posts
    60

    Tabular form text box colors

    Hello,



    I'm trying to use a tabular form that displays current projects and I want to be able to highlight projects that are withing 14 days of being due. I would like to set it up so that projects that are outside the 14 days have a background color of white, and the projects that are within 14 days have a background color of red. Here is what I have so far:

    Private Sub Form_Load()
    If Me.MIL_DATE < Date + 14 Then
    Me.MIL_DATE.BackColor = vbRed
    Else
    Me.MIL_DATE.BackColor = vbWhite
    End If
    End Sub

    When I have a project that is within 14 days, this code turns all the text boxes for the "Mil_Date" column red, instead of just the one for entries within the 14 day window. Is there a way to tell Access that I want only the ones that are within 14 days to appear red, or am I limited because it's a tabular form?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    The easiest way to accomplish this is with Conditional Formatting. Select the textbox you want to format in design view and select Format/Conditional Formatting and play with the settings there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    avarusbrightfyre is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Sep 2009
    Posts
    60

    Thanks!

    That worked great! Things you don't learn when you figure things out yourself..... Thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    No problemo; there are so many features that I don't think anybody knows them all, even the folks who wrote Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Continuous Form colors
    By cl3093 in forum Forms
    Replies: 8
    Last Post: 11-29-2010, 05:09 PM
  2. Replies: 1
    Last Post: 11-24-2010, 09:51 AM
  3. Pie Chart Colors!
    By dannyowl in forum Access
    Replies: 0
    Last Post: 05-12-2010, 09:30 AM
  4. Tabular Form
    By Evgeny in forum Forms
    Replies: 0
    Last Post: 04-26-2010, 08:39 PM
  5. Remove items from Tabular Form
    By JoshS in forum Forms
    Replies: 3
    Last Post: 04-26-2010, 02:18 PM

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