Results 1 to 4 of 4
  1. #1
    trident is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    141

    Start and End Dates must appear in the Report

    I made a query where I need to get the data between to dates.

    In the query I mentioned this to be "Start Date and End Date". Whenever, I open the query, it always asks the starting date and the end date of the report.

    I transferred the same into a report and it works fine.



    Now, I need the dates to be shown as part of the report.

    How can I do this.

    Your assistance is greatly appreciated.

    Thank you.

    Trident

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It sounds like you have a Parameter Query which prompts you to enter the dates at run-time. You could show the MIN and MAX dates in returns, but the issue is if either does not exactly match the dates you enter as your parameters, you won't get what you are looking for. I have run into this before, and I don't think you can do it with a Parameter Query.

    Here is what I did. I instead made a selection Form, where you enter the date range that you want. I then have the selections in that Form tied to a single line Table, so my entries are stored as Field Values in a Table. So then I can use that Table in my query to both:
    - return those two fields as values (so I can show them on my Report)
    - use as Criteria to limit my records

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    i use a form w 2 text boxes. txtStartDate, txtEndDate.
    they are used in the query AND for the 'header' note by making a virtual field:

    Header: "From:" & forms!MyForm!txtStartDate & " To:" & forms!MyForm!txtEndDate

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I do like ranman has shown. That said, you can use your bracketed criteria on the report, like in a textbox:

    ="From: " & [Enter start date] & " To: " & [Enter end date]

    the key being the text must exactly match what was used in the query.
    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: 6
    Last Post: 02-06-2015, 12:45 PM
  2. Replies: 3
    Last Post: 11-03-2014, 03:30 PM
  3. Replies: 6
    Last Post: 06-28-2014, 07:45 PM
  4. List Dates between Start and Finish Dates
    By Buddus in forum Queries
    Replies: 1
    Last Post: 07-26-2013, 01:58 PM
  5. Replies: 3
    Last Post: 04-11-2012, 01:13 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