Results 1 to 6 of 6
  1. #1
    cnunez is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    3

    Filter a Report

    Hello,



    I'm designing a database for work to track our orders. I'm doing a few things:

    I have a master table (tblChangeOrders) that I pull multiple queries/reports from. One of the things that I have to keep track of is the date that I sent out an order for a customer's signature. After I don't hear back from that customer for five days, I have to follow up with them. So what I set up is a macro that automatically exports a report (rptOutstanding) to Outlook that is supposed to show outstanding orders for the day. rptOutstanding is based on a query (qryOutstanding). In qryOutstanding, I filter out other records that I don't need. In rptOutstanding I display [SentforSignature] and I have a textbox named "Outstanding", in the control source I have:

    =DateAdd("w",5,[SentforSignature]) and this adds five days to the date that it was sent for signature.

    Everything works great, except my report is showing dates beyond today. So I was trying to find a way to filter out any records with the [SentforSignature] date greater than or equal to the current day.



    Any help will be appreciated!
    Attached Thumbnails Attached Thumbnails 2014-01-23 13-05-28_Microsoft Access - COProcessTracker _ Database (Access 2007 - 2010).png  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Why are you using "w" as the interval? It does seem to work but "d" should be the interval for days.

    SentforSignature < Date()

    The criteria can be static in the report RecordSource or in the report Filter property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    cnunez is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    3
    Quote Originally Posted by June7 View Post
    Why are you using "w" as the interval? It does seem to work but "d" should be the interval for days.

    SentforSignature < Date()

    The criteria can be static in the report RecordSource or in the report Filter property.
    Thanks for the response!

    I set the interval to "w" because I was under the impression that access would count weekdays. Is that not right?

    Also, you said SentforSignaure < Date() just returns a value of -1.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    -1 is the value for True.

    SentforSignature must be less than Date() for the record to retrieve. Did you put <Date() as the criteria under SentforSignature field?

    "w" does not skip weekends or holidays. Test it in the VBA immediate window:
    ?DateAdd("w",4,Date())
    1/28/2014
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    cnunez is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    3
    Quote Originally Posted by June7 View Post
    -1 is the value for True.

    SentforSignature must be less than Date() for the record to retrieve. Did you put <Date() as the criteria under SentforSignature field?

    "w" does not skip weekends or holidays. Test it in the VBA immediate window:
    ?DateAdd("w",4,Date())
    1/28/2014

    Ok so, I changed the "w" to "d".

    And the this is what I have in the Outstanding control source:

    =DateAdd("d",5,[SentforSignature])<Date()

    And it seems to be working, but it returns -1 (true and 0 (false) instead of the dates. Also, How do I filter out the "0's" from the report?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    It returns -1/0 because of the <Date().

    <Date() belongs on the Criteria row of query under SentforSignature field. That is the filter to exclude the "0's".
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-25-2013, 01:20 PM
  2. Replies: 2
    Last Post: 05-10-2013, 03:37 PM
  3. how to filter the Report
    By ismailkhannasar in forum Reports
    Replies: 2
    Last Post: 02-05-2013, 07:41 PM
  4. Report Filter
    By SFC in forum Reports
    Replies: 4
    Last Post: 01-11-2012, 04:13 PM
  5. Filter Report
    By BorisGomel in forum Reports
    Replies: 2
    Last Post: 06-09-2011, 03:22 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