Get started whit VBA

amator

Registered User.
Local time
Today, 02:50
Joined
Aug 1, 2006
Messages
23
Hi.
I'am trying to make script which counts time durations together from table. My table looks like this:
[start time] [end time] [duration(min)]
12:20........13:10.......50
13:20........13:40.......20
And my query should look like this:
[hour] [duration] [fault happened]
12........40...........1
13........30...........2
So I have to make a script which counts somehow duration and [start time] minutes together and if it is over 60 then adds those minutes to the next hour.
Could someone help me to get started whit VBA. For example how I can handle my tables fields whit VBA?
 
Hi,
If u have a form with three textfields: Start time, End time, Duration, then i'd try it with textfields and Hour() and Minute()
 
You do realise that date/time fields in Access, when you only enter a time, retain a date? Around 01-Jan-1900 if I remember correctly.

Also, the Duration field in your table can be removed as it defeats the purpose of the third normal form (look it up) of database normalisation.
 
Yes I know that these fields are date/time fields. I only write times into my example but there really are like this: "12.3.2006 10:20".
If somebody knows some good tutorial pages about VBA and making scripts whit VBA please let me know.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom