Results 1 to 4 of 4
  1. #1
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Tool Count in individul records with condition

    Hai,

    I have a form in Access 2010 where we define the tools using for assembling products. We have more than 2500 products and each of them need different tools for assembling components together, named as "Tool Kit". There are 20 standard tools in the form, named separately. Technicians define "Tool Kit" needed for each product with tool number and its location. In most cases, 10 to 14 tools will need to assemble a product. Tools which are not required for a product is defined as "N/A" in the form. Very rare products need all 20 tools for assembly.

    My question is, how do I get a count of tools defined for each product? I mean, I need a count of fields which are not defined as "N/A" of each record and keep the value in the field "ToolCount" in the same record. Is there any query, macro etc. which I can get the tool count easily, other than counting tools in each record and enter the value manually.

    I spent a lot of time using If -- then---Elseif --- etc. Nothing worked out. Appreciate your valuable help.



    Thank you and God Bless You.

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    See Dcount http://www.techonthenet.com/access/f...ain/dcount.php
    Use [YourFieldName]<>'N/A' for criteria ( Single quotes around N/A required if it is a text field)

  3. #3
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69
    Thank you Amrut for spending some time, trying to solve my problem. Dcount function, as far as I know, counts all records in the given domain (table/query), within the specified criteria. Here I need to count the tools of each record, not the table. Just like how many field in a form has data other than "N/A". Any function or provision available in Access 2010?

    Thank you for helping. God Bless You.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    We have more than 2500 products and each of them need different tools for assembling components together, named as "Tool Kit". There are 20 standard tools in the form, named separately.
    Have you considered a basic 3 table approach?

    Product
    ProductId PK
    ProductName
    other product specific info

    Tools
    ToolId PK
    ToolName
    other Tool specific info

    ProductRequiresTools (identifies which tools are required for which product)

    PRTId PK
    ProductID FK to product
    ToolId FK to tool
    any other info specific to this Product and this Tool combination

    To get the Tools required for a specific product

    Code:
    Select ToolID from ProductRequiresTools
    WHERE  ProductID = [Enter the Product Id ]

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

Similar Threads

  1. Replies: 1
    Last Post: 04-08-2013, 11:58 AM
  2. Replies: 1
    Last Post: 01-24-2013, 05:50 PM
  3. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  4. Replies: 2
    Last Post: 04-04-2012, 03:52 AM
  5. Replies: 5
    Last Post: 03-23-2012, 11:40 AM

Tags for this Thread

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