Startup and the API

J

Jim Shores

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.)
 
T

Tim Ferguson

--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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top