Results 1 to 5 of 5
  1. #1
    Join Date
    May 2008
    Posts
    5

    Exclamation Unanswered: DCount Multi Value Field Access 2007

    Hello. Thanks to you who have taken the time to check out my question. Thanks in advance for those who might be able to help.
    I'm a complete novice! I've played with Access to track my personal buisness needs. I made the mistake to show my boss what i could do. Next think you know, i'm the resdient specialist in Databases!
    So, I have a problem that I can't figure out.
    The attached is a copy of a table that I have. Several columns are multi value fields - as you can plainly see.
    I'm trying to do a 'Dcount' on each id number in each multivalued field to show on a report. I wrote my dcount like:

    =dcount("[ConnectID]","test03","tap to ground=3") All i get is an error

    But--when i write the query on a NON multivalued field, I get a good result. ie:

    =dcount("[ConnectID]","test03","COD >0" Good result!

    is there another way, in ACCESS to get a record count based on a parameter for a multi valued field?

    I sure hope that I made sense.

    Thanks again to all that help me out.

    Have a great day!
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    =DCount("[ConnectID]","test03","[tap to ground]=3")

    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    First issue is that you have spaces in your field name 'tap to ground' which can make using it in code a bit difficult. It can be done, but I suggest avoiding spaces in field names.

    The second issue is that 'tap to ground' is not a numeric field (looks like either text or memo) and can not =3. It could be like "3" or ="3".

    Third, 'multi valued' fields are generally not a good idea.

    If you're just getting started, do a bit of reading on data normalization and naming conventions. Setting things up right can save a lot of time and frustration in the future.

  4. #4
    Join Date
    May 2008
    Posts
    5
    the brackets solved the problem. thanks a bunch!

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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