Results 1 to 3 of 3
  1. #1
    RickieV is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    2

    Adding input data

    Hi, I'm new to Access 2010, and learned about Tables, Lookup and etc.

    I already enter data and need to find out how to add data.

    e.g.

    Date, Location Code, Violation Code

    7/14/2013, 56, 5
    7/16/2013, 68, 7
    7/18/2013, 56, 5



    I want access to be able to lookup Location Code 56 within a date range inputed, and add the Violation Code totaling 5+5 = 10

    is this possible ?

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,969
    Why is a code summed?

    Maybe you need to do an aggregate (GROUP BY) Totals query.

    SELECT LocationCode, Sum(ViolationCode) WHERE [Date] Between [EnterStartDate] AND [EnterEndDate] GROUP BY [LocationCode];

    Access Help (or search web) has more info on using the query designer to build Totals queries.


    BTW: Advise no spaces or special characters/punctuation (underscore is exception) in naming convention. Also, avoid reserved words as field names. Date is a reserved word.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RickieV is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    2
    Why Code summed?

    I need to get the total number for ViolationCode given at a specfic LocationCode.

    I will try your example and see if it gives me what I'm trying to get. Thanks.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2014, 07:32 AM
  2. Data Type to input data number
    By TioAdjie in forum Access
    Replies: 5
    Last Post: 02-17-2014, 11:21 AM
  3. Replies: 3
    Last Post: 08-07-2013, 06:03 AM
  4. Replies: 1
    Last Post: 08-06-2013, 07:52 PM
  5. Replies: 3
    Last Post: 12-19-2011, 11:18 AM

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