473,322 Members | 1,690 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,322 software developers and data experts.

Automatic time calculation

I have created a form and I have a field "time". When i enter a time i want in another field to autocomplete the time i entered previously +45 minutes. for example

Enter 15:20 and the result is 16:05
Apr 15 '10 #1
6 1673
NeoPa
32,556 Expert Mod 16PB
I suggest the simplest solution is to have an unbound control (not field) on your form with a formula of :
Expand|Select|Wrap|Line Numbers
  1. =[Time]+#0:45#
Apr 15 '10 #2
I want to enter the time and to be calculated automatically. how it will "read" the time I give?
Apr 15 '10 #3
NeoPa
32,556 Expert Mod 16PB
If you have a control on your form called [Time] (as you appeared to indicate in your first post - albeit referring to it as a field) the the formula includes a reference to that control as [Time]. I should mention at this point that naming anything as [Time] is highly dubious in itself as it's a reserved word and they should be avoided for names, but regardless of the name, the idea should work for you.
Apr 15 '10 #4
i call it departure_time because time is a reserved word. I want to have an arrival time which is plus 45 min. I tried the expression you told me but it auto corrects to 12:45:00 pm.
Apr 15 '10 #5
NeoPa
32,556 Expert Mod 16PB
What expression did you use exactly?

If you used what I posted with no amendment then that is exactly what you'd expect. That was for the name as you'd posted it earlier (Remember - my mind-reading powers should never be relied upon too heavily).
Apr 15 '10 #6
hedges98
109 100+
atonisg - It sounds like you are putting NeoPa's suggested code in the departure_time field. Don't do this, add an unbound control (textbox I assume) and enter NeoPa's code into that:
Expand|Select|Wrap|Line Numbers
  1. =[departure_time]+#0:45# 
Apr 16 '10 #7

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

Similar topics

5
by: Tom | last post by:
A field in a data set I want to import into Access is in Unix time (seconds from a certain time on a certain date). Does anyone know the precise date and the precise time on that date that Unix is...
5
by: cvisal | last post by:
Hi all Im working on productivity calculations (Time calculations) and need some help in coding. Database Tool:MS-Access 2003. The general operator punch-in time is 5:30 AM and the punch-out...
7
by: Ben R. | last post by:
How does automatic type casting happen in vb.net? I notice that databinder.eval "uses reflectoin" to find out the type it's dealing with. Does vb.net do the same thing behind the scenes when an...
1
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP11. I have followed the docs at http://tinyurl.com/qckrn and enabled automatic statistics collection. It has been 2 days since I updated my DB cfg and...
8
by: andreas | last post by:
Hi, I have a calculation program in vb.net who is running for let us say for more than a hour. When I will do meanwhile something els in a office program I see that my calculation program takes a...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
17
by: Sunburned Surveyor | last post by:
I was thinking of a way I could make writing Python Class Files a little less painful. I was considering a Ptyhon script that read a file with a list of property names and method names and then...
6
by: Lara1 | last post by:
I'm trying to get certain cells to show a hovering alert message when I click on them. (I don't want an error-message style box to pop up, because I'll eventually want it to show for lots of cells...
3
by: Norm | last post by:
If RUNSTATS is called directly, we can specify UTIL_IMPACT_PRIORITY to limit CPU consumption. For automatic runstats, there is no place to specify this paramater. Will it use the DBM value of...
0
by: vamsioracle | last post by:
Hi all I have a disco Report with two sheets. In sheet 1, i used a function from database that inserts data (based on some calculation) into a table. In sheet 2, the column inserted by function in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.