Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    NJ
    Posts
    4

    Unanswered: Change Font color for new Info

    Hi,

    I have entered default values on my form to save time. Is there an easy way to change the font color for values that were changed to something other than the default? This will signal the user that they have visited that record and that they may have changes 1 or 2 values in that record.

    Any suggestions.

    Thanks

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    You'll have to do this through code.

    Here's a pretty easy approach off the top of my head:
    Using the On_Current event of the form, rifle through the controls and change the color property of it's value matches the default.
    A fast, efficient way to do it would be:
    Code:
    Dim ctl As Control
    For Each ctl In Me.Controls
        If Me.Tag = "CheckMe" Then
            If ctl.Value = clt.DefaultValue Then ctl.ForeColor = 255 Else Me.ForeColor = 0  ' 255= Red, 0 = Black
        End If
    Next
    For this to work, place the default value in each control's "DefaultValue" property and place "CheckMe" in each control's Tag property (don't use the quotes in the Tag property).

    The down side of this is: in a continuous form, change the color of a text box and it changes the color of that text box in EVERY visible record.

    There are more complicated methods of handling this in multi-forms, but for the sake of sanity, use a single form.

    Have fun

  3. #3
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    Might I suggest possibly an easier way?

    Use Conditional Formatting in Form Design (Right Click on a control to bring this up, then very straight-forward)

    This works well for continous forms as well.

    Hope that helps.

  4. #4
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    sorry. I should preface my suggestions by pointing out that I'm using Access 97 and occasionally 2000.

  5. #5
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Smile

    no need to apologize tcace, I've learned a few things from your other posts...they're always insightful.

    Have a nice weekend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •