Results 1 to 3 of 3
  1. #1
    Gooford is offline Novice
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    10

    Parameter query using dates leading to subtotals

    Hi,



    I have a list of coded transactions in column A, Amounts in B and Dates in C.


    I want to show subtotal for all amounts with the same codes in D

    I can do this simply without the date parameters, but I need to give timeframes.


    WHen I add the [From] and [Until] questions it then shows the amounts next to each date even though the date column is hidden.

    I'm aiming for the subtotal of amounts for same codes between given dates:

    Example
    ABB 100 1/6/11
    ABB 100 6/6/11
    ABB 150 1/8/11
    ABC 50 1/7/11
    ABR 50 2/8/11
    ABJ 50 1/5/11

    If I enter 1/6/11 and 30/6/11 I would expect ABB to show £200 total as 150 is after that date and so not counted

    Hopefully I have explained that ok - let me know if not.

    Thanks and regards

    Matt

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    In your query (in design view in the QBE Grid) you would have all three fields down in the fields area but you would uncheck the SHOW box on the date and then with the GROUPING enabled (using the button which looks like a Greek Sigma) you would then change the date one from GROUP BY to WHERE.

    Then you can put your parameter prompts in. However, I would avoid using parameter prompts and have a form for input. Here's another take on why not to use parameter prompts:
    http://www.tek-tips.com/faqs.cfm?fid=6763

  3. #3
    Gooford is offline Novice
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    10
    Thanks you thats great.

    I will read up on your link also.

    Regards

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

Similar Threads

  1. need two subtotals in ms access
    By learning_graccess in forum Access
    Replies: 1
    Last Post: 10-20-2011, 10:52 AM
  2. More detailed subtotals
    By kcmiuser in forum Queries
    Replies: 0
    Last Post: 06-27-2011, 06:10 AM
  3. Subreport grouping subtotals
    By herolind in forum Reports
    Replies: 1
    Last Post: 06-18-2011, 10:23 AM
  4. Replies: 0
    Last Post: 11-17-2010, 01:21 AM
  5. Subtotals within a query
    By mulefeathers in forum Queries
    Replies: 2
    Last Post: 06-07-2010, 01:02 PM

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