Results 1 to 5 of 5
  1. #1
    geoffcox is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    3

    show records in this month last year?

    Hello

    I have a date field in my table and would like to be able to find those entries in this month a year ago.

    Can the query be a genral one so that no matter which month I run the query in it will find those records in this month, but 1 year ago?

    Cheers

    Geoff

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you looked at the DateAdd() function yet?

  3. #3
    geoffcox is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    3
    No - but will take a look at DateAdd() !

    Cheers

    Geoff

    PS I'm new to this so may have to come back!

  4. #4
    geoffcox is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    Have you looked at the DateAdd() function yet?
    In fact DateSerial() seems to work

    Between DateSerial(Year(Date())-1,Month(Date()),1) And DateSerial(Year(Date())-1,Month(Date())+1,0)

    Cheers

    Geoff

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent choice! Are you ready ti use the Thread Tools at the top of the thread and mark this thread as Solved?

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

Similar Threads

  1. Sorting by month and day - without year
    By TracyBell in forum Access
    Replies: 3
    Last Post: 11-17-2011, 10:29 AM
  2. Replies: 2
    Last Post: 03-26-2011, 02:43 PM
  3. Replies: 0
    Last Post: 03-25-2011, 02:37 PM
  4. default month and year
    By beefyalby in forum Forms
    Replies: 3
    Last Post: 12-05-2010, 11:40 PM
  5. by year by month
    By nkuebelbeck in forum Reports
    Replies: 21
    Last Post: 03-24-2010, 01:53 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