Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    34

    Question Unanswered: Changing Form Text Colour

    Yo, some help here people...

    I am creating a form to show the status of orders, and ideally want to change the colour of the text to reflect the status of the order - e.g. red if its late, yellow if its on time and blue if its ahead.

    I would appreciate it greatly if somone could tell me how to achieve this, and what view (form/datasheet) it can be used with.

    Thank you kindly.

  2. #2
    Join Date
    Jul 2004
    Posts
    56

    Conditional Formatting

    Try searching for help on 'Conditional Formatting'. In essence click Format on the toolbar and select Conditional Formatting. Whilst the test box in the form is slected, you can create different conditions for the text or background colour to change dependant on what is displayed in the box. Have a play with it and get your best results from that.

    Col_Bol

  3. #3
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    If you're using Acc2000 or newer, you can use Conditional Formatting. (Don't think it came with with Acc97)

    It works in Form or Continuous Form view, not datasheet.

    Just right click on the text box -> Conditional Formatting, then very straight-forward.

    HTH.

  4. #4
    Join Date
    Jul 2004
    Posts
    34
    Thanks for the advice, but...

    This method works fine for changing the appearance of a single control, but ideally I'd like to change the appearance of a whole line, in response to the value of a single field on that line.

    I'm sure I've seen this done in Access, but don't know how? Plus, I'm pretty sure it was done using a datashet view!?

  5. #5
    Join Date
    Sep 2004
    Posts
    161
    You can try this

    Dim contr As Control

    ' Remise blanc des controles
    For Each contr In Me.Controls
    If contr.ControlType = acTextBox Then
    contr.ForeColor = xxxxxxx
    End If
    Next
    and for each control type you need

Posting Permissions

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