Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2005, 06:52 AM
Authorized User
 
Join Date: Sep 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default capturing activity

Hi all,

I am needing to capture as much activity as I can within a database, and insert into a hidden table within the db.

you know how on all other microsoft apps you can run macros when the workbook/document etc is opened, is it possible that I can run a macro when the database is opened?

And the same on close? as in, i would like to set a variable when the user enters the database, and when they close, before close it writes the info to the table.

is this possible?

thanks

Patrick

Visit my site: http://www.drybonesuk.com
__________________
Visit my site: http://www.drybonesuk.com
 
Old December 21st, 2005, 08:19 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   Yes, you can capture user activity in many ways, and you can define an autoexec macro that runs when you open the app.

   For closing the app, what I would suggest is creating a hidden table and form, and have the form open when the database is opened (acHidden) and then for the form's On Close event, put in your closing code. I use hidden forms to track user activity and manage rights (since I have an app that runs on a machine that is always on with only one user account on the machine. I make each user log in to the app with security that I built into the app that does not use the integrated Access security - since every user shows up as Admin.)

   Anywho, does this help? Do you need code etc? I am sure other posters here have elegant solutions.

HTH


mmcdonal
 
Old December 21st, 2005, 09:20 AM
Authorized User
 
Join Date: Sep 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thats great thanks very much.

i have a form in the database that opens on startup and closes obviously when you exit. the only way you can close the form is by closing access (except for using keys to close it but shh...), and the tracking is in the open/close event of the form.

so thanks very much! as for the rights you mentioned, i like that idea... i may have a think about implementing something like that myself...

thanks again

Patrick

Visit my site: http://www.drybonesuk.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
last activity updates with newsletter vantoko BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 July 25th, 2007 02:56 PM
bug in activity tracking vantoko BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 February 25th, 2007 11:29 AM
last activity time of a oracle session ravish_agarwal Oracle 1 April 11th, 2006 02:04 PM
Activity schedule edubbelaar Access 3 November 24th, 2004 11:21 AM
An activity by user B trigger an event for A bigmish Classic ASP Basics 1 July 3rd, 2004 04:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.