Results 1 to 4 of 4
  1. #1
    stevekroll is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    16

    Filtering and Display of Multiple Date Fields


    I am using Access 2010. I am trying to create an activity report for a specific period(monthly, quarterly) based on a query that has several date fields per record in the table. Each date field is a due date for a report/filing requirement. So the activity report should show the due dates for those dates falling between the start and end dates of the query/report. For each date field, dates falling before or after the date range should be excluded. In design view, when one of the date fields is filtered for the date range using the date function, that particular date field column is correctly filtered, but the other date fields show dates prior and after the date range because the record contains all the date fields not just the one filtered. The other date fields should be shown, but I don't want dates outside the date range displayed. In design view, should I filter each date field for the date range?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Filtering does not exclude or include fields, filtering is applied to include or exclude records. Whether or not a date field shows its value would have to be accomplished with an expression using the field. That expression can be done in query or textbox on report or maybe even with Conditional Formatting.

    How are the start/end date parameters specified? Are they entered in controls on form?
    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
    stevekroll is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    16
    The start/end parameters were specified in the Criteria section in design mode. What type of expression would be entered to not show a value in a field and where do you enter it?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Expression can be in query to construct a field. Expression would be on the Field row of query. Access Help has more info on using expressions in query. Expression can be in ControlSource property of textbox on form or report.

    Example:

    IIf([datefield]<[start date] Or [datefield]>[end date], Null, [datefield])

    Options for specifying the start and end dates:

    1. hard coded in the expression

    2. if expression in query, can be popup prompts

    3. enter values in textboxes on a form and reference the controls as input parameters
    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. Filtering by multiple fields
    By rhubarb in forum Queries
    Replies: 1
    Last Post: 12-05-2013, 04:34 PM
  2. display multiple fields combo box
    By statty01 in forum Access
    Replies: 5
    Last Post: 07-03-2013, 05:29 PM
  3. Replies: 5
    Last Post: 08-07-2012, 10:12 PM
  4. Replies: 12
    Last Post: 05-07-2012, 12:41 PM
  5. Replies: 2
    Last Post: 02-20-2012, 08:32 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