Results 1 to 6 of 6
  1. #1
    cc143most is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    20

    Best Way Handle a Date Range

    I have a very basic MasterTbl that is imported from Excel.&nbsp; Each line item is a task that was not completed on-time.&nbsp; The fields are: Employee, Customer, Date (This is a daily Long date with time that I have formatted to Short Date).&nbsp; I need to count this data different ways and have created several Crosstab Queries:<br>1) Number of shifts worked by Employee<br>2) Number of customers helped by employee and shift <br>3) Total number of customers helped<br>4) Total of overdues with breakdown by date (count of Date)<br><br>These all work great and give me exactly what I need.&nbsp; However, I need to be able to enter a date range and have the totals from each of the above queries reflect that date range so that I have one report that shows the employee, how many shifts were worked for the time period, how many customers were helped, and how many tasks were not completed on time (this comes from the date field).&nbsp; <br><br>Do I have to create separate queries, entering the date range for each, or is there an easier way?&nbsp; I feel like I am making this harder than it should be, but have completely confused myself.<br><br>Thank you for any help you can provide!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No need for separate queries; just add a criteria in your query. Most of use use forms to gather user input, in which case the criteria would look like:

    Between Forms!FormName.FromTextboxName And Forms!FormName.ToTextboxName

    Special note for crosstab queries:

    Crosstab Query with a Parameter
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    cc143most is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    20
    Paul,

    Thank you for the reply. It worked great, although it took me quite a while to figure out how to use the form to run my queries. Data Pig Technologies' instructional videos helped tremendously for this. I am not very good at reading and applying the knowledge; I do much better being shown so their short videos are great for me.

    Have a wonderful day!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Glad you got it working!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    cc143most is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    20
    How do I mark this as solved?

    Thanks!

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    I did it for you; it's up at the top under "Thread Tools".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 07-18-2012, 10:13 PM
  2. Date Range Report with Multiple Date Fields
    By StevenCV in forum Reports
    Replies: 13
    Last Post: 02-29-2012, 08:29 AM
  3. Replies: 1
    Last Post: 01-24-2012, 01:13 AM
  4. Specify A Date Range
    By jo15765 in forum Queries
    Replies: 17
    Last Post: 10-11-2011, 07:16 AM
  5. Date range Q
    By markjet in forum Queries
    Replies: 13
    Last Post: 07-18-2011, 01:00 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