473,396 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Subform : Increment time in new records [from last record]

11
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
Expand|Select|Wrap|Line Numbers
  1. Subform Record 1     - 'StartTime' = 06:00, 'EndTime' = 12:00
  2. Subform New Record - 'StartTime' = [12:00]*, 'EndTime' = 12:15
  3.  
* As you can see, the new subform record's 'StartTime' is set by the previous records 'EndTime' and is incremented by 15 mins.
May 7 '11 #1
1 1793
ADezii
8,834 Expert 8TB
Set the Default Value of the [StartTime] Field in the Sub-Form to
Expand|Select|Wrap|Line Numbers
  1. =DateAdd("n",15,DLast("[EndTime]","tblTimes")), 
adjusting for Table Name.
May 7 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Alain Guichaoua | last post by:
Good evening to all Here is my problem : I have a form with a subform. They are linked. When I open the form I would like the subform to reach its last record. I tried the method...
3
by: Anthony Kroes | last post by:
I have a subform on a form and they are not linked. On the main form is a text box where the user types in a number. When that number changes, I have some code to make the corresponding text...
6
by: MLH | last post by:
When the vehicle entry form (frmVehicleEntryForm) first opens, the additional owner SubForm control (frmAddnlOwnrListSubForm) is enabled. You can click on it and it will accept the focus. But after...
5
by: John | last post by:
Hi Everyone, I use the following to get records from the last two days in MySql: where date_entered <= curdate() and date_entered >= DATE_SUB(curdate(),INTERVAL 2 day) I'm looking to do the...
0
by: byuphil | last post by:
My subform is displaying records from a table. Using the master-child links I am able to pass all of the necessary keys to show the correct information. When I try to select any item from a...
0
by: Andrew | last post by:
Hi all A quick question which I've not been able to solve from trawling the web. Is it possible to have a control in the detail section of a form set to a default view of "Continuous" which...
7
by: robtyketto | last post by:
Greetings, I have a main form. Upon filling in a combo box it then displays a subform (based on a query that uses values in the combo box on where clause) THe subform has the paramater Data...
3
by: 6afraidbecause789 | last post by:
Kudos to anyone who can explain this one--how to duplicate a group of continuous records in a subform for use in a new subform PK ID. The 2 entry fields (combo boxes) in the subform are RoleID and...
1
by: bkberg05 | last post by:
Hi -I have a form which contains a sub-form. The sub-form is tied to the main form by a shared field called Project_ID. The main form has one record per Project. The sub-form has many records per...
4
by: steve75043 | last post by:
Hello I hope someone can help with this. I need to subtract dates in current record from previous record for the current store. The key fields in the form are customer, store number and date picked...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.