Results 1 to 4 of 4
  1. #1
    dmc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2

    counting number of used months in each year within a query

    hi
    i have a query to calculate the monthly depreciation for a machine for specific period of time.
    my problem is how to get the number of months for each period assuming i want to start from month September 2009 till may 2012.
    attached the data extracted by the query.
    i want to calculate the depreciation to be grouped year by year in report.
    regards
    dmc


    [TR]
    [TD][TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]
    [TD][/TD]


    [/TR]
    Attached Files Attached Files

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    I suppose you have two textboxes on a form in wich the begin and end dates are ?

    Then you would go about it like this :

    DateDiff("m",[BeginDate],[EndDate])

    Aircode, i hope it works

  3. #3
    dmc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2

    Question

    when grouping by year in the report will this give me the depreciation for each year and get the total for all the period

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Are you able to post a dummy db with some sample data. This would help to give you an exact workable answer.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-09-2011, 09:15 AM
  2. Counting Months
    By xzero1484 in forum Queries
    Replies: 1
    Last Post: 02-21-2011, 03:49 PM
  3. Counting the number of enrollees on a course
    By slaterino in forum Access
    Replies: 2
    Last Post: 10-12-2010, 12:24 AM
  4. Replies: 11
    Last Post: 08-04-2010, 04:26 PM
  5. Replies: 4
    Last Post: 08-27-2009, 01:21 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