Filtering Access Reports Based on Formated a Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zandiT
    New Member
    • Sep 2008
    • 48

    #1

    Filtering Access Reports Based on Formated a Date

    Hello

    I have an access report and im using a query to filter the report using Date parameters eg Start Date-12 May 2009 and End Date-30 September 2009. the query works perfectly.

    My problem is recently i formated the date values so they appear as May 2009 instead of 12 May 2009. When i tried to use the filtering query again it did not work.

    Instead the result set from the query only showed records from the two dates in the parameter, May 2009 and September 2009, instead of results for the whole range May 2009 June 2009 July 2009 August 2009 September 2009.

    Below is my query

    >=[Start Date] And <=[End Date]

    To format the date field i used this code in the query
    Month: Format$([tblUsers.Date],"mmmm yyyy",0,0)

    Thankyou for your help
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    what data type are [Start Date] and [End Date] ?

    Based on the results you are getting I suspect they are text fields. They have to be date fields for your query to work. You can still view them as mmm yyyy by formating the date fields.

    Comment

    • zandiT
      New Member
      • Sep 2008
      • 48

      #3
      Hello msquared
      Thankyou yes the data type was text and after changing it to date, the query worked. Thankyou again for your assitance

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by zandiT
        Hello msquared
        Thankyou yes the data type was text and after changing it to date, the query worked. Thankyou again for your assitance
        You're very welcome :)

        Comment

        Working...