Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    45

    Unanswered: conditional formatting: syntax problem

    Hallo i'm stuck on a stupid problem. I write this code in the conditional formatting area but it doesn't work. It tells me that there is a syntax mistake. Don't know what it is: quotes, comma? please enlighten my stupid brain

    thanks

    DCount("[Org_Longname]", "tbl_Organization", "Org_Longname='" & Me![txt_Longname] & '")>1

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    I am not sure where the conditional formating area is (it's a new one to me) but I think you have missed out a quatation mark after Me![txt_Longname] & !?

    ie should be

    DCount("[Org_Longname]", "tbl_Organization", "Org_Longname='" & Me![txt_Longname] & "'")>1

    Hope this helps (but in is not normally as simple as this ?).

    MTB

  3. #3
    Join Date
    Feb 2004
    Posts
    45
    thanks mikethebike,
    obviously there were more than one mistake because it's still insisting on the syntax error...

    the last attempt i used this:
    DCount("[Org_Longname]", "tbl_Organization", "Org_Longname='" & Me![txt_Longname] & "'")>1

  4. #4
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi Davide77

    You have not indicated what you are rying to achieve with this statement ie what context.

    I assume this is part of and IF statment or some statament that evaluates as a logical result !?


    MTB

  5. #5
    Join Date
    Feb 2004
    Posts
    45
    The aim is to highlight the backcolor of a txt field in a continuous form when it is duplicate. The expression in itself is not part of something else: it counts if how many time there is the content of a field. I'm using it in the conditional formatting so, as far as I know, you don't need to programatically give any extra information than the criteria.

  6. #6
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    As I indicated before I do not know where conditional formatting is applied in ACCESS(97), so I cannot help/comment further.

    Sorry

    MTB

  7. #7
    Join Date
    Feb 2004
    Posts
    45
    Ok, mike, thanks anyway

Posting Permissions

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