Results 1 to 6 of 6
  1. #1
    aneeshskmr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    3

    Calculate Number of Years, Months and Days between 2 dates

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	73.6 KB 
ID:	22204Click image for larger version. 

Name:	Capture1.JPG 
Views:	8 
Size:	123.0 KB 
ID:	22205

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,778
    "Not working" means what - error message, wrong results, nothing happens?

    Post the code for the getTimeElapsed function.
    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
    aneeshskmr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    3
    Click image for larger version. 

Name:	Capture3.JPG 
Views:	7 
Size:	43.9 KB 
ID:	22209.
    Error message: Undefined function 'getTimeElapsed' in expression


    Code:
    Elapsed Time: getTimeElapsed([Join Date],[EndDate])

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,778
    This is a VBA custom function. What you show is calling the function. It is not the function code.

    The procedure must be placed in a general code module so the query can find it.

    Apparently, the function does not exist in your db, at least not where the query can find it.
    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
    aneeshskmr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    3

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,778
    Why did you post a link to this thread?

    Where did you learn about this function? You need the VBA code.
    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: 05-28-2015, 06:58 AM
  2. Replies: 3
    Last Post: 09-22-2014, 04:38 PM
  3. Replies: 1
    Last Post: 02-12-2013, 02:33 AM
  4. Display Age in Years, Months, Days
    By jsimard in forum Programming
    Replies: 1
    Last Post: 01-18-2012, 08:08 PM
  5. Replies: 1
    Last Post: 11-12-2010, 01:16 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 - Senior Forums