Results 1 to 3 of 3
  1. #1
    Tracy is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2021
    Posts
    1

    Conditional Formatting of combined field


    Hi, I have a field that is combined from two other fields. They are alpha-numeric. {-123 (D) 324 (T)} is the combined field. It is either all red or all black. How can I get the field to look like: -123 (D) 324 (T), or 123 (D) -324 (T). Basically any Negative #'s in red. Or will the formatting from the two other fields go to the combined field. The reason I have the combined field is for saving space on print-out.

    Thanks Tracy

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Display them as 2 separate fields using appropriate formatting for each.
    Adjust the report layout to minimise space occupied if that is an issue
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    or set the control to richtext and use html

    for your example, the content might look like

    <font color=red>-123 (D)</font> 324 (T)

    if a query you would build it as

    myformattedtext:"<font color=red>" & fld1 & "</font> " & fld2

    where fld1 in the name of your field containing "-123 (D)"

    and fld2 is the name of your field containing "324 (T)"

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

Similar Threads

  1. Replies: 5
    Last Post: 05-22-2017, 01:34 PM
  2. Replies: 1
    Last Post: 01-05-2017, 05:14 PM
  3. Conditional formatting for a empty field
    By Bradex in forum Forms
    Replies: 4
    Last Post: 03-18-2016, 09:11 PM
  4. Conditional Formatting on datetime field
    By Delta729 in forum Access
    Replies: 3
    Last Post: 05-06-2015, 03:37 PM
  5. Conditional Formatting based on another field - Part II
    By Harley Guy in forum Programming
    Replies: 8
    Last Post: 10-17-2013, 12:46 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