Startup and the API

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Getting around to the time-accounting aspect of my 'project' mobile.mdb, it occured to me to offer these specs to you gracious folks:
(I know alot more coding --the macros are baffling so far)

--When the .mdb starts, it will write Date to field 'Startup' in tblSometimes?
--When the .mdb closes, it writes a Date to field 'Finishup' in tblSometimes?

For some reason, I keep wanting to get back to this Visual C#.NET deal or callbacks or something cool. Words are hard to find to express my awe and gratitude for all of you. I guess because I am/everwill be Class Amatuer. (I had SDK then VC/C++ 1.0.)
 
--When the .mdb starts, it will write Date to field 'Startup' in
tblSometimes?

Add a macro and call it Autoexec. Probably something like RunSQL and
"INSERT INTO tblSometimes (Startup) VALUES (DATE())" unless you want the
time as well, in which case use NOW() instead of DATE().
--When the .mdb closes, it writes a Date to field
'Finishup' in tblSometimes?

You can't trap the Application_Close event, so you need to create a hidden
form and use its Form_Close event to do the same thing:

CurrentDB().Execute _
"INSERT INTO tblSometimes (Finishup) VALUES (NOW())"

Hope that helps


Tim F
 
Back
Top