Results 1 to 3 of 3
  1. #1
    baba is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    43

    Can I change Month(Now) value only within MsAccess2007

    Can I change Month(Now) in Msaccess to point to someother month without changing the system date in the taskbar date/time settings of my computer.
    In otherwords,is there a way to change the date/time settings to affect only MsAccess DB without affecting other documents.
    I am using the below query and I want to control Month(Now) to point to a month of my choice rather than taking the system month/date.

    SELECT Table1.[StartDate], Count(*) AS Expr1
    FROM Table1
    WHERE [StartDate] >= dateadd("m" ,-13,DateSerial(Year(Now), Month(Now), 1) )
    And (Table1.[EndDate])<DateAdd("m",0,DateSerial(Year(Now()),Month(Now() ),1))
    and ( Table1.[System] = "TEST")
    GROUP BY Table1.[StartDate];

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Use a parameter input. The input can be a prompt in the query or reference to control 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
    Kirsti is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    See my post titled "Financial Year not Calendar Year" below. I had a similar issue, & Jim gave very detailed instructions on how to get it working.
    https://www.accessforums.net/showthr...-Calendar-Year
    Last edited by June7; 05-03-2012 at 04:03 PM. Reason: Mod edit: add link to thread

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

Similar Threads

  1. Replies: 1
    Last Post: 02-28-2012, 05:05 PM
  2. Month/Month to date
    By Tony McGuire in forum Queries
    Replies: 9
    Last Post: 09-20-2011, 11:54 AM
  3. Track capacity changes month by month
    By Nils in forum Database Design
    Replies: 1
    Last Post: 02-18-2011, 03:03 PM
  4. Replies: 5
    Last Post: 11-15-2010, 06:12 PM
  5. % Change by Month in a Cross-tab Query
    By William McKinley in forum Queries
    Replies: 0
    Last Post: 07-10-2010, 11:45 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