Results 1 to 4 of 4
  1. #1
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53

    Conditional Formatting with more than 3 conditions

    I have been searching the internet for the last few days, looking for a solution to this and can't figure this out. I am trying to set up a code that allows for more than three conditions on conditional formatting. I have picked up a lot on VBA coding while doing this but still can't figure it out. I have copied the coding I am using below. It right now works only in that it color codes the entire column based off the last selected option. Can someone assist me in getting it to color code each record instead of the column?

    Private Sub Company_BeforeUpdate(Cancel As Integer)
    Select Case Company
    Case "A"
    Me.Company.BackColor = 123456
    Case "B"
    Me.Company.BackColor = 234561
    Case "C"
    Me.Company.BackColor = 345612
    Case "D"
    Me.Company.BackColor = 456123
    Case "E"
    Me.Company.BackColor = 561234


    Case "F"
    Me.Company.BackColor = 612345
    End Select

    End Sub

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Perhaps the following link will help:
    http://www.access-programmers.co.uk/...d.php?t=154634
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53
    I have already explored that one, as well as a number of others. I couldn't find the coding in there to get the job done unless it is hiding.

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    There is no coding - that is the beauty of it. No code required!

    Open the table "TblStatus". Double click on one of the fields that has "bitmap image".
    Then open the query "QryAddendances".

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

Similar Threads

  1. Conditional Formatting
    By bellevue in forum Forms
    Replies: 4
    Last Post: 05-17-2012, 06:03 AM
  2. Conditional formatting
    By avarusbrightfyre in forum Forms
    Replies: 3
    Last Post: 07-01-2011, 11:18 AM
  3. Conditional Formatting
    By Desstro in forum Programming
    Replies: 3
    Last Post: 12-01-2010, 09:52 PM
  4. Conditional Formatting
    By cevatyildiz in forum Forms
    Replies: 8
    Last Post: 04-30-2010, 12:01 PM
  5. Conditional formatting
    By ylivne in forum Reports
    Replies: 1
    Last Post: 07-12-2009, 06:18 PM

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