Results 1 to 5 of 5
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    224

    Between Dates Report Problem

    I am generating a report which looks up the sales between dates. the report is generating perfectly ok.



    what i want is that this report should show the first and the last date i input. i dont know how to do that.
    eg. From Date 01-Jan-2009 To 30-June-2009


    the querry i am running has a criteria set on Transaction Date
    Between [Enter Starting Sales Date MM/DD/YY] And [Enter Ending Sales Date MM/DD/YY]

    Regards
    Aamer

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,906
    All DateTime fields have a Time component, even if it is set to midnight (.00). To make sure you get all of the last day you should add one day to that value to it will actually be set to midnight of the next day.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  3. #3
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    224
    i think u did not understand my problem

    see when i clik to generate the report it ask me, the the first and the last date period.

    now when the report is printed on the top margin i want it to show the starting date and the ending date.

    as this report is generating the totals of items sold in a perticular period. At present I have to write on each page the Staring & End Date. so in future I know what period this report was for.

    Please see report sample attached.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,906
    Sorry, I did not understand your problem correctly. How are you invoking the report? Do you do it from a Form?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    bcmarshall is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2010
    Posts
    86
    You've used the wrong syntax. Your expression is:

    Between [Enter Starting Sales Date MM/DD/YY] And [Enter Ending Sales Date MM/DD/YY] That will require you to input the date parameters into the query.

    Instead, create a form field with the dates on it and draw from there. Between [Forms]![MyForm]![Date1] And [Forms]![MyForm]![Date2]. Everything is the same, except that you're inputting the date data in a form, and that in turn can be drawn into the report.

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

Similar Threads

  1. Replies: 13
    Last Post: 09-27-2010, 03:10 PM
  2. Filtering Report with between dates
    By patrickmcdiver in forum Reports
    Replies: 3
    Last Post: 02-22-2010, 12:11 PM
  3. Need report to show dates
    By Brian62 in forum Reports
    Replies: 2
    Last Post: 11-20-2009, 12:05 PM
  4. Replies: 5
    Last Post: 09-16-2009, 05:22 PM
  5. Replies: 4
    Last Post: 08-27-2009, 01:21 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 - Senior Forums