Results 1 to 2 of 2
  1. #1
    dek is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2011
    Posts
    4

    Time: How to increment time in form

    Hi,



    Thanks for viewing this post.

    I have a subform called 'Time' that captures alot of time activity by day.

    Two of my fields are 'StartTime' and 'EndTime'

    I would like to increment the 'StartTime' for a new record (when focused on new record) by using the last record's 'EndTime'. Furthermore, I would like to set the 'EndTime' automatically by 15 mins.

    Example
    Code:
    Subform Record 1     - 'StartTime' = 06:00, 'EndTime' = 12:00
    Subform New Record - 'StartTime' = [12:00]*, 'EndTime' = 12:15
    * As you can see, the new subform record's 'StartTime' is set by the previous records 'EndTime' and is incremented by 15 mins.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    Same suggestion as in your other thread https://www.accessforums.net/forms/subform-copy-selected-fields-current-row-new-row-13372.html

    Set global variables then in the code use DateAdd function to increment the variable.
    Last edited by June7; 05-07-2011 at 07:59 PM.

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

Similar Threads

  1. Replies: 12
    Last Post: 02-22-2011, 03:39 PM
  2. time equation in form
    By WCR in forum Forms
    Replies: 2
    Last Post: 01-05-2011, 11:13 PM
  3. Replies: 6
    Last Post: 01-04-2011, 05:43 PM
  4. Replies: 2
    Last Post: 12-23-2010, 09:11 AM
  5. How To Create A 'One Time Use' Form
    By dr_destructo in forum Forms
    Replies: 6
    Last Post: 04-08-2010, 08:02 AM

Tags for this Thread

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