Access VBA Jenny Duskey jduskey@accdevjd or jduskey@comcast Phone: 215-884-2959
Access VBA Jenny Duskey jduskey@accdevjd.com or jduskey@comcast.net Phone: 215-884-2959. If you have questions or problems concerning VBA coding or other Access issues in between sessions don’t hesitate to email or phone me. Universal Elapsed Time Functions.
Access VBA Jenny Duskey jduskey@accdevjd or jduskey@comcast Phone: 215-884-2959
E N D
Presentation Transcript
Access VBAJenny Duskeyjduskey@accdevjd.com or jduskey@comcast.netPhone: 215-884-2959 If you have questions or problems concerning VBA coding or other Access issues in between sessions don’t hesitate to email or phone me.
Universal Elapsed Time Functions • Format([StartTime] -1 -[EndTime], "Short Time") • Elapsed: DateDiff("n", [StartTime], [EndTime])
How It Works Format([StartTime] -1 -[EndTime], "Short Time"), how does this work? The trick is in the default form of the Access calculator. Any format short time using the minus becomes midnight; hence Format(-1, "short time") becomes midnight Then the system is positional. -1= 24:00- and 1- = 00:00+ (00:00 and 24:00 are the same time (midnight) but different expressions) . #23:00#-1 = 23:00-24:00 =1 and 1-#07:30# = 00.00+07:30 = 7.30 then add 1 + 7:30 = 8:30 Have Fun Robin Stoddart-Ston