Results 1 to 8 of 8
  1. #1
    delaikhi is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    15

    Question Range of date in a report


    Hi there, I have a question:
    I put dates in a range like this in a query: between #03/26/2014# and #04/26/2014#. Now, on the report based on this query, I want to put a field that displays the months that reflected in the query. Any way to do this? Thanks a bunch

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    It would be very unusual to hard code dates into a query like that. Most of us would use a form for the user to enter dates, alternatively you can have

    Between [enter start date] And [Enter end date]

    Either would be more dynamic and either will let you put the same dates on the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    delaikhi is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    15
    Hi Paul,
    That what I am trying to do. In fact I, have a form to pick dates and than it would reflect on a query. It runs OK with the query, but when it comes to the report, it would not show the date range that I put on the previous form. What I really want to do is to have a field that automatically says: ORDER REPORT from 03/26/2014 to 04/26/2014. Thanks

  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,642
    A textbox with a control source like:

    ="From " & Forms!FormName.FromTextbox & " to " Forms!FormName.ToTextbox

    will show the dates. Change the items in red to your names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    delaikhi is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    15
    Thanks a bunch, Paul, awesome

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    delaikhi is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    15
    Quote Originally Posted by pbaldy View Post
    Happy to help, and welcome to the site by the way!
    Paul, 1 more quick question, how can I put that in a specific format like: dd/mm/yyyy?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Wrap each form reference in the Format() function.
    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. Passing A Date Range From Form To Report
    By JeffGeorge in forum Reports
    Replies: 3
    Last Post: 03-11-2014, 12:50 PM
  2. Date Range Report
    By seth.murphine in forum Reports
    Replies: 3
    Last Post: 04-23-2012, 02:46 PM
  3. Date Range Report with Multiple Date Fields
    By StevenCV in forum Reports
    Replies: 13
    Last Post: 02-29-2012, 08:29 AM
  4. Getting a date range to show on a report
    By recon2011 in forum Reports
    Replies: 3
    Last Post: 01-10-2012, 01:27 PM
  5. Define a date range for a report - Help
    By Optimus_1 in forum Access
    Replies: 4
    Last Post: 06-02-2010, 04:50 AM

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