Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have form field populate automatically when another field is populated

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
I have a Time Field on my form that shows like 1:30pm or
2:15 pm etc. What I want to do is when this field (Timefield)
is populated I want to add 60 minutes exactly and have
that time appear in a Duration Field. So if:

TimeField is 12:30 pm then
Duration should be 1:30 pm

If Time Field is 9:15 am then
Duration should be 10:15 am.

Does anyone know how I can do this?
 
on after update
me.Duration = dateadd("n",60,TimeField )
 
netrusher,

Words are important.

Duration is not a point in time. It is a, uh... duration of time, a time period, a time lapse. As such, there is no such thing as a duration of 1:30 pm or 10:15 am.

After a duration of 60 minutes from the point in time of 12:30 pm, the the ending time would be 1:30 pm.


–noun 1. the length of time something continues or exists (often used with the).
2. continuance in time.
3. (in the philosophy of Bergson) a temporal continuum, intuitively known, within which the élan vital operates.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top