Results 1 to 4 of 4
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    print report with date filter

    Hi

    yet another question -thanks people

    have a table with a list of books, in that table is a date field that represents the date the book is due back

    I created a report and a button to call the report to list all the books this works fine.

    I then tried to find where I add filter criteria to only print the books due in the current month taken from the system.

    Two issues

    1, Can't see where to put the criteria

    2. What is the correct format for the criteria - research gave me



    =month(date())



    But 'm not sure

    thanks

    Ian

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    almost there....
    In a blank field in the query
    month([DueDate])

    In the criteria line under this:
    put [Enter Month]
    then you can run it for the 1 month.

    or
    put forms!frmRpt!cboMonth
    to use a form instead of user enter parameter

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    I have totaly confused myself which is not difficult I know!!!

    I Used the report wizard to create a report based on a table and I've got it looking just as I wanted!!!

    I then went to my opening form and in design mode added a button,

    right click on the button and selected "build event"

    Selected open report, saved it and then pressed the button

    Hey presto report displays perfectly.

    I now want to filter the results so that in a date field ie 12/11/2015 only the current month is displayed ie if it is now july only month 7 is shown and in august only month 8 is listed.

    In the open report dialog box I have options to add a filter name or Where Condition =

    I am confused as to which to use.


    I have scoured the web and keep finding different bits of code ie

    WHERE Format(RenewalMonth,"yyyymm")=Format(Date(),"yyyym m");

    I've tried the suggestion in this posting and I'm sure it's right it's just I'm missing something out thats vital

    I'm begining to even doubt I'm creating the report in the correct way

    Can some nice person tell me if my method is wrong?

    thanks

    Ian

  4. #4
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    solved

    Month([RenewalMonth])=Month(Now())

    thanks all

    Ian

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

Similar Threads

  1. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  2. Filter Report by Optional Date Range and Combo Box
    By ARickert in forum SQL Server
    Replies: 3
    Last Post: 10-17-2012, 10:46 AM
  3. filter date from Query pass down to report
    By geraldk in forum Reports
    Replies: 1
    Last Post: 08-17-2012, 10:14 AM
  4. Code to combine report filter and date range
    By rhubarb in forum Reports
    Replies: 17
    Last Post: 10-28-2011, 03:08 PM
  5. Replies: 32
    Last Post: 06-20-2011, 07:30 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