+ Reply to Thread
Results 1 to 4 of 4

create select query to sum values in between dates

  1. #1
    Registered User
    Join Date
    01-10-2016
    Location
    New York
    MS-Off Ver
    2010
    Posts
    77

    create select query to sum values in between dates

    Hello Friends!

    Need to create a select query to sum sales figures in between dates.

    How can I do that?

    Thanks.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: create select query to sum values in between dates

    Assuming three fields in Table1: ID, Sales, SalesDate
    Want all sales between 1/1/2016 and 1/4/2016

    SELECT Table1.Sales, Table1.ID, Table1.SalesDate
    FROM Table1
    WHERE (((Table1.SalesDate) Between #1/1/2016# And #1/4/2016#));

    If you want the total, then click on the Sigma in the ribbon after running the query.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-10-2016
    Location
    New York
    MS-Off Ver
    2010
    Posts
    77

    Re: create select query to sum values in between dates

    Thank you so much.

    I am not sure I told you but I am a novel to Access. Where do I put the line of code?

    Thanks again

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: create select query to sum values in between dates

    You will need to create a query. This is a SQL statement and not code. You will need to use this as a guide as your field names and tables may not be the same.

    https://support.office.com/en-us/art...d-c29c276ee6b0

    https://www.youtube.com/watch?v=QRQhBVF-6Ng

    This is the SQL statement equivalent to building the query in the QBE

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Passing Multiple Values To Query With Multi Select Box
    By Excel4444 in forum Access Tables & Databases
    Replies: 0
    Last Post: 07-18-2016, 02:47 PM
  2. [SOLVED] Writing a SELECT query to return only records with duplicate values in one column
    By mc84excel in forum Access Tables & Databases
    Replies: 3
    Last Post: 04-24-2015, 12:16 AM
  3. Need a query for select & replace the column values in vba
    By kavitha.v in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2014, 05:54 AM
  4. Replies: 3
    Last Post: 09-26-2012, 02:27 PM
  5. Replies: 9
    Last Post: 07-31-2012, 05:54 PM
  6. Replies: 0
    Last Post: 10-16-2006, 02:32 PM
  7. [SOLVED] HELP!!! How do you create a query crieria for multi values??
    By JamesS in forum Excel General
    Replies: 0
    Last Post: 06-17-2005, 07:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1