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 November 30th, 2004, 12:12 PM
ppenn
Guest
 
Posts: n/a
Default Record Object usage

I have a databse with approximately 180 queries in, which have been added over about two years.
I am attempting to reconcile the system and delete any unnecessary queries. To save time I was wondering if there is a way of monitoring when users open queries/forms etc so that you can decide if they are needed
Thanks in advance
Peter
 
Old December 1st, 2004, 05:44 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

For when they were used, that's not possible. For when they where last modified, that is possible.

In Access XP (2002) if you open the database, you should see the toolbar with the following buttons: Open, Design, New, Delete, Large Icons, Small Icons, List, Details.

If you choose details and then click the "Modified" header, the queries will sort by date last modified. From there you can get an idea of its last usage if the query is usually modified before being used.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old December 22nd, 2004, 09:12 PM
Authorized User
 
Join Date: Oct 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can also run the following query if you want them to be displayed in a datasheet view by querying the MS Access system table named MSysObjects:

SELECT MSysObjects.Name, MSysObjects.DateUpdate
FROM MSysObjects
WHERE MSysObjects.Name Not Like "~sq_*" AND MSysObjects.Type=5
ORDER BY MSysObjects.Name;

If I recall correctly, queries with prefixes of "~sq_" are internal SQL statements used within form and report properties. Using the "Not Like" clause in this SQL will show query objects only.

You can list objects by type by using the following WHERE condition in the same SQL:

WHERE MSysObjects.Type = n

Substitute values for "n" gives you:

1 = Native Access Tables
4 = ODBC-Linked Tables
6 = MS Jet/Access Linked Tables
5 = Query Objects
-32768 = Form Objects
-32764 = Report Objects
-32756 = Data Access Page
-32766 = Macro Objects
-32761 = Module Objects

Selecting the column name "Connect" in your SQL statement will give you the connection string information for an ODBC-Linked table.

Selecting the column name "Database" will give you the MS Access/Jet database, path, filename, and remote-linked table name for a MS Access/Jet linked table.

Selecting the column name "DateCreate" will give you the date and time that the object was created.

Selecting the column name "ForeignName" will give you the remote linked table name for an ODBC-linked table.





Similar Threads
Thread Thread Starter Forum Replies Last Post
usage of cdata vsempoux XSLT 1 July 11th, 2008 08:38 AM
Receiver Usage scott.nortman BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 1 June 25th, 2008 11:02 PM
Combo to Search for Record w/Calendar Object Odeh Naber Access 10 May 14th, 2007 07:23 AM
Problems with copyRecord method of Record object Syster Tara Classic ASP Basics 7 September 19th, 2006 10:55 PM
Software usage [email protected] C++ Programming 0 October 15th, 2004 06:30 PM





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