Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    111

    Unanswered: move filter to actual query statement

    Hi,

    I have a report whose data source is myQry which is a Query type. The report also has a filter of the form:
    (((DateSubmitted Between #12/01/2006# And #12/31/2006#)))

    In the Select block of myQry is:
    IIf(IsNull([dateSubRegistrar]),[dateSubOffice],[dateSubRegistrar]) AS DateSubmitted.

    How do I move the filter from the report property to the Where block of myQry?

    Thank you in advance.

    regards,

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    If you have got a DATE fields (filter) on the form, then put criteria in
    the query:

    Between [Forms]![FormName]![DateFieldName1] And [Forms]![FormName]![DateFieldName2]

  3. #3
    Join Date
    Jul 2006
    Posts
    111

    ...

    thanks for the reply but this isn't exactly what i am looking for.
    the idea is to be able to view the raw data that the query is feeding to a report. In the property of the report, the query is set as its data source and a filter as specified above is also set. By the time the report is displayed it has already 'sanitized' the data available to the user. This is because of the filter and the different expressions set in each cell of the report. The report is displaying some discrepancy in data with another tool I am using so I want to be able to view the raw data from the result set of the query. Sorry if this is a bit long, I just want to illustrate the problem best I can.

    Thank you in advance.

    regards, g11DB

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Put this in as the where statement in your query:

    WHERE IIf(IsNull([dateSubRegistrar]),[dateSubOffice],[dateSubRegistrar])
    Between #12/01/2006# And #12/31/2006#
    Inspiration Through Fermentation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •