Results 1 to 4 of 4

Thread: Change colour

  1. #1
    Join Date
    May 2014
    Posts
    8

    Question Unanswered: Change colour

    Hi hope someone can help

    I have a form that searchers data under a date value.
    its a continuous form that depending its results it shows in rows.

    The problem I have is that I have set the check box if ticked to change the backcolour of a text box using:

    Private Sub Flexi_Urgent__Click()
    If Flexi_Urgent_.Value = True Then
    Patient_ID.BackColor = 10092543
    End If
    End Sub

    but this changes all text boxes Patient_ID.
    I just want the row that contains the tick for the text box "Patient_ID backcolour to change.

    Can anyone help?
    I hope this make sense
    Many thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    That's how formatting works, in Datasheet View or Continuous View Forms , unless you use Conditional Formatting for this kind of thing. In Design View

    1. Right-Click on Patient_ID
    2. Click on Conditional Formatting
    3. Under Condition1 use the dropdown and select Expression Is
    4. In the next box enter [Flexi_Urgent_] = -1
    5. Use the BackColor Icon (the 'paint bucket') and select the desired color
    6. Click OK
    Be careful that you use the correct name for the checkbox in Step #4; your post includes a trailing underline for Flexi_Urgent_, which is kind of odd, and may be an artifact from copying and pasting the code. Just be sure to use the exact name.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    May 2014
    Posts
    8

    Thumbs up Chenge colour

    Missinglinq you are a legend!
    Thanks so much

    Worked perfectly

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Good luck with your project

    and

    Welcome to dBforums!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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