Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2020
    Posts
    2

    Query to add up locations by date


    I have a data table with the following fields
    date
    location
    name
    the data has about 100 records with different dates and name and locations I am trying to run something that would tell me hoe many records there are for a certain location in a certain time frame and make a graph. Is this possible I have watched a ton of videos and nothing I have made is adding up the locations, for example I dont want location A to show up 10 times I want it to say Location A 10.

    thx

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    on a form put the date range boxes: txtStartDate, txtEndDate
    the query would then use it as the range

    select location, count(name) from table between forms!fMyForm!txtStartDAte and forms!fMyForm!txtEndDAte
    or
    select Date, location, count(name) from table between forms!fMyForm!txtStartDAte and forms!fMyForm!txtEndDAte

    you could also graph the query.

  3. #3
    Join Date
    Dec 2020
    Posts
    2
    Thx for the instructions I am not sure what the for is, this is the screen I am on
    Click image for larger version. 

Name:	Capture2.PNG 
Views:	7 
Size:	17.3 KB 
ID:	43708





    Quote Originally Posted by ranman256 View Post
    on a form put the date range boxes: txtStartDate, txtEndDate
    the query would then use it as the range

    select location, count(name) from table between forms!fMyForm!txtStartDAte and forms!fMyForm!txtEndDAte
    or
    select Date, location, count(name) from table between forms!fMyForm!txtStartDAte and forms!fMyForm!txtEndDAte

    you could also graph the query.

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

Similar Threads

  1. Query to optimize warehouse locations
    By Sunshack in forum Queries
    Replies: 4
    Last Post: 02-25-2019, 12:03 PM
  2. Sales Locations and Sales to Locations
    By Dinger045 in forum Access
    Replies: 1
    Last Post: 04-19-2016, 12:41 PM
  3. Same query different locations different results
    By RayMilhon in forum Programming
    Replies: 4
    Last Post: 11-06-2013, 06:29 PM
  4. Trusted locations
    By kcmiuser in forum Security
    Replies: 1
    Last Post: 08-14-2013, 09:48 AM
  5. Replies: 0
    Last Post: 01-26-2011, 05:51 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