Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Apr 26, 2026
Solved

Bold Duplicates (Conditional Formatting)

Hello experts

 

I have a form based on qryLCAmends

I want to bold the [LCNo] if there is a duplicate but ONLY where LCID = LCID

here is what I have but it doesnt bold anything:

DCount("*","qryLCAmends","[LCID]=" & [LCID] & "[LCNo]='" & [LCNo] & "'")>1

LCNo is text. 

I am using the "expression" in conditional formatting: 

 

Example: 

 

How can I do this with conditional formatting?  

  • Try:

    DCount("*","qryLCAmends","[LCID]=" & [LCID] & " AND [LCNo]='" & [LCNo] & "'")>1

     

6 Replies

  • XPS35's avatar
    XPS35
    Iron Contributor

    Try:

    DCount("*","qryLCAmends","[LCID]=" & [LCID] & " AND [LCNo]='" & [LCNo] & "'")>1

     

    • Tony2021's avatar
      Tony2021
      Steel Contributor

      Odd. I dont know what it is.  maybe the form is corrupted.  anyways I think i have the correct codes.  thank you.  

    • Tony2021's avatar
      Tony2021
      Steel Contributor

      hello...thank you for the response.  

      I see where the edit is 

      However it seems to bold all records. 

      would you happen to know what the issue could be?  

      I was thinking adding a paren on the 2nd criteria?

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor

        Show us your revised expression, please, rather than describe it. The original failed because it used the concatenation operator  -- & -- rather than the logical operator -- AND -- in the expression. Perhaps there's still a small typo that needs to be revised.