Results 1 to 6 of 6
  1. #1
    EVERA is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    3

    Criteria in date field

    In the query I am trying to put a criteria in a date field. What I want is to get all the data that fits in one month. Can you please help.
    Thanks


    PS I use Microsoft access 2010

  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,638
    Post your attempted query SQL statement.

    Possible WHERE clause:

    Format([date field], "yyyymm") = [enter yyyymm criteria]
    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
    EVERA is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    3
    Quote Originally Posted by June7 View Post
    Post your attempted query SQL statement.

    Possible WHERE clause:

    Format([date field], "yyyymm") = [enter yyyymm criteria]
    In the criteria I am putting #????-06-??# Where ?? is a wildcard. In this case I want all the record that is June.

  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,638
    My suggested criteria is text, not a date. The parameter for my suggestion would be: 201406

    I forgot apostrophes.

    Format([date field], "yyyymm") = "'" & [enter yyyymm criteria] & "'"

    Do you want June for every year?
    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
    EVERA is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    3
    Quote Originally Posted by June7 View Post
    My suggested criteria is text, not a date. The parameter for my suggestion would be: 201406

    I forgot apostrophes.

    Format([date field], "yyyymm") = "'" & [enter yyyymm criteria] & "'"

    Do you want June for every year?
    That is what I want. I want the month for any year.
    thanks

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,638
    This is resolved?
    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: 5
    Last Post: 08-20-2014, 10:18 PM
  2. Replies: 2
    Last Post: 06-09-2014, 11:23 AM
  3. Replies: 1
    Last Post: 06-09-2014, 11:17 AM
  4. Replies: 2
    Last Post: 04-27-2010, 01:25 PM
  5. Setting criteria in a calculated date field
    By SteveReberger in forum Access
    Replies: 0
    Last Post: 10-29-2008, 06:58 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