Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Suffolk, United Kingdom
    Thanked 0 Times in 0 Posts

    Conditional formating (2003)

    Hi all is it possible to display a form in continuous form view, and change the background colour and font colour if one of the data fields meets a certain criteria. I would want this to work per record.

    For example if my form display the fields ID, Received Date, Appointment Date, and Code

    All the records with a receieved date of Date()-126 I want to have black backgrounds with white text
    Date()-119 I want Red Background White text
    Etc Etc
    Many thanks
    Gerbil (AKA Kevin)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Conditional formating (2003)

    You can specify up to three conditional formats for a control:
    - Open the form in design view.
    - Select the Received Date control.
    - Select 'Field value is' from the first dropdown.
    - Select 'equal to' from the second dropdown.
    - Enter Date()-126 in the box next to it.
    - Specify the formatting that you want.
    - Click Add >> to add a new condition.
    - Etc.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Mt Macedon, Victoria, Australia
    Thanked 45 Times in 44 Posts

    Re: Conditional formating (2003)

    If you want the conditional formatting to apply to the whole row, rather than just to one control, you can put a large unbound text box behind all the other controls in the form, the full width of the form, and apply the conditional formatting to that text box. Set its Control Source to = "".
    But you don't what this to be able to come in front of the other controls and hide them. To stop that I put some code in the "on got focus" event for that text box, setting the focus to another control.
    Attached Images Attached Images

Posting Permissions

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