Results 1 to 5 of 5
  1. #1
    joym is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2017
    Posts
    57

    Question Creating reports based on current date pulled from the system

    I am creating reports using query and use "where" and input a criteria "Between [Enter Start Date] And [Enter End Date]"



    the user has to input the date to get the reports. I want it to be automated that as soon as its the report is opened it only pulls that days report.
    is there a way to check the systems date and time and use that as input

    Similarly for monthly reports instead for manually inputting the dates for the month. check which month it is on the system and display that months reports.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    It's better to use a form with 2 textboxes, txtStart, txtEnd
    a button to open the report. Any report.
    the query would be,
    select * from table between forms!myForm!txtStart and forms!myForm!txtEnd.

    the form can default to today.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You can put

    Date()

    in the criteria to get today's date. These should help with the monthly:

    'First of month
    DateSerial(Year(dte), Month(dte), 1)


    'Last of month
    DateSerial(Year(dte), Month(dte) + 1, 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    joym is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2017
    Posts
    57
    Quote Originally Posted by pbaldy View Post
    You can put

    Date()

    in the criteria to get today's date.
    i did try the date () dint work when i run the query, result is displayed in the table.
    but ill give it another go and also try the monthly suggestion

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Make sure the field is date/time, not text.
    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: 8
    Last Post: 07-12-2016, 11:06 AM
  2. Replies: 2
    Last Post: 07-07-2014, 09:19 AM
  3. Macro using 'date' (current system date)
    By msmithtlh in forum Macros
    Replies: 4
    Last Post: 06-11-2014, 04:05 PM
  4. Creating Last Run Date for Reports
    By housmand in forum Reports
    Replies: 17
    Last Post: 06-03-2014, 09:37 AM
  5. Replies: 8
    Last Post: 03-07-2012, 01:18 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