Updating / Initializing Table Fields Upon Exiting Access

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

Guest

Is it possible to update "Field B" with data from "Field A", and then
initialize/clear "Field A" upon exiting Access?
 
Is there a reason you need to do it on exit.. like a time last update thing
or something? Otherwise, you might be better of doing it on load... in case
the database crashed or hung, and you never got a chance to run your update
query.
 
Access does not have a built-in "Database close" event, however you can use
an "always-open" form to achieve the same thing:

http://www.mvps.org/access/general/gen0005.htm
Prevent Access from closing

The link talks about using a Switchboard for this, but you can use any form
(even if hidden) to do the same thing.
Then run your 2 update queries from the Unload event of that form.

In your case you might not care how the user is closing the app, just that
"if Form_Unload has been triggered then the app is closing so I need to do
x, y & z.."
 

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

Back
Top