Results 1 to 10 of 10
  1. #1
    Chris6789 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    7

    Changing colour on priority.

    Hi,

    I have recently started using Access (the one with Office 2019), I´m using the task manager template.
    In the priority field I want to change the priority number to a different colour depending on which priority is selected. Such as ´(1) High´ would be red and ´(3) Low´ would be green.



    Thanks very much!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Look at Conditional Formatting on the ribbon.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Chris6789 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    7
    I tried that with ´field value is´ équal to´ ´(1) High´
    But couldn´t get it to work.

    Thanks.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Is that what the field actually stores, or does it perhaps just store 1 but shows "(1) High"? Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Chris6789 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    7
    I did try just ´1´origionally, but it didn´t work.

    Do you mean upload the whole database save file?

  6. #6
    Chris6789 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    7
    The error it gives is:

    The expression you entered contains an invalid syntax.
    You may have entered an operand without an operator.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes, I meant the database file, if possible (easier to figure out sometimes when you can put your hands on it).

    Was the

    (1) High

    enclosed in quotes? It needs to be because it's text. A numeric value wouldn't.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Chris6789 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    7
    Afternoon, yes you are right, I didn´t realise it need to be in speech marks.

    Thanks very much!

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    if you only have 3 priorities and only want to set the text colour rather than the background you can use the format property rather than conditional formatting

    the only requirement is the priority needs to be numeric and the values positive, negative and zero (e.g. high could be -1, low 1 and medium 0). Appreciate you are using 1,2,3 at the moment but perhaps you can change or if the field is not updateable by the user populate the controlsource with =[priority]-2

    so given the above, put

    [GREEN]"Low";[RED]"High";[BLUE]"Medium"

    in the control format property

    colours you can use are Black, Blue, Green, Cyan, Red, Magenta, Yellow, White.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by Chris6789 View Post
    Afternoon, yes you are right, I didn´t realise it need to be in speech marks.

    Thanks very much!
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Priority Field
    By linvall in forum Access
    Replies: 33
    Last Post: 10-24-2018, 02:37 PM
  2. Replies: 3
    Last Post: 08-22-2016, 08:02 AM
  3. Changing text box back colour
    By Duncan in forum Forms
    Replies: 3
    Last Post: 02-23-2013, 05:32 PM
  4. Changing the colour of a cell?
    By WayneSteenkamp in forum Access
    Replies: 3
    Last Post: 03-08-2012, 10:12 AM
  5. Changing Text colour on value amount
    By stu_C in forum Forms
    Replies: 1
    Last Post: 08-08-2011, 06:58 AM

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