Results 1 to 2 of 2
  1. #1
    stu_C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    38

    Changing Text colour on value amount

    Hi all


    I have a form with different number values, is it possible the when a value gets under a certain number the text colour in that field can change?

    so for instance
    if the text field MilageLeft goes under 1000 it changes to red?

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    stu_C -

    Depending on the type of form you are using and your application, you might be able to use conditional formatting or VBA to accomplish your goal. Check out the Conditional Formatting options in the format menu. If VBA, the same code would be used in the Current Event of the form as well as the AfterUpdate event of a control(s) that triggers a re-calculation of the MilageLeft field. Something like...

    If Me.MilageLeft < 1000 then
    Me.MilageLeft.ForeColor = 255
    else
    Me.MilageLeft.ForeColor = 0
    end if

    Hope this helps,

    Jim

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

Similar Threads

  1. Replies: 0
    Last Post: 02-17-2011, 08:34 AM
  2. Replies: 9
    Last Post: 11-26-2009, 05:03 PM
  3. Replies: 3
    Last Post: 08-11-2009, 10:40 AM
  4. Replies: 0
    Last Post: 02-12-2009, 05:23 AM
  5. Change the colour of a form background
    By r_e_v_a_n_s in forum Forms
    Replies: 0
    Last Post: 11-15-2005, 03:39 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