473,396 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Query Log/Tracking

I have a legacy system of 400+ queries in an Access database, some of which are still in use, some not and I need to replace these queries (with Reporting Services alternatives) but I do not know which are still used. Asking the users isn't really an option.

Does MS Access keep a log of all query usage, who by and when? Or does anyone know a way of achieving this through some other method?

Any help/advice/guidance gratefully received.
Jun 27 '13 #1
2 5526
Seth Schrock
2,965 Expert 2GB
What version of Access are you using? If the queries that need replaced don't have a form/report linked to the query, then you should be able to use the Object Dependencies tool. In Access 2010, this can be found under the Database Tools tab in the ribbon in the Relationships group. Just click on it to open it (it will pop up on the side of your screen), make sure that "Objects that depend on me" is selected, click on a query name (single click to just select, but not open it) and then click refresh in the Object Dependencies window. This will tell you what forms, reports, or queries use the selected query.

However, this doesn't tell you how often the query is used or by whom, or anything else about usage. It only tells you if it is being used as the datasource for another object.
Jun 27 '13 #2
zmbd
5,501 Expert Mod 4TB
There isn't such a log per say; however, there is a partial tracking of each object in the system tables.
Unless all of your queries are ran via a user interface, in which case you can add code to log when used the best that can be done is the following:

I can only verify the following for V2010
You should never access the system tables in the production copy of the database, corrupting these tables may make it difficult or impossible to open your file.
BACK-UP! BACK-UP! BACK-UP!
USE AT YOUR OWN RISK
I highly recommend that you use this on a COPY of the database.
Open a new query, switch to SQL view, copy and paste the following into the window. Save the query as "Qry_ShowMeQueries"
Expand|Select|Wrap|Line Numbers
  1. SELECT MSysObjects.Name
  2.    , MSysObjects.Owner
  3.    , MSysObjects.DateCreate
  4.    , MSysObjects.DateUpdate
  5. FROM MSysObjects
  6. WHERE ((Left([name],1)<>"~") 
  7.          AND ((MSysObjects.Type)=5));
This will now open a list of all of your queries within your database and the headers should be self-evident; however, take note that the field [DateUpdate] is the last date that a change was made to and SAVED to the query.

--- There's always the B&M method... delete all of the queries that are not used for a form, report, etc... (use Seth's method to find these).
Then wait for the complaints to show up (the B&M).
Jun 27 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: david liu | last post by:
access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i...
5
by: Art | last post by:
Hi, Can anyone point me to an example of how I would execute a query I've created in an Access DB. I've copied the SQL down to my VB.net application and that works fine, but it's ugly. I'd like...
8
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
4
by: ShastriX | last post by:
Getting a weird error while trying out a query from Access 2003 on a SQL Server 2005 table. Want to compute the amount of leave taken by an emp during the year. Since an emp might be off for...
12
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
3
by: Idlemind23 | last post by:
Ahoy! I'm hoping for some help on what (I believe) should be a simple task. I have a form with a button. I would like that button to have a caption with a date. That date should be pulled out...
3
by: =?Utf-8?B?bXNjZXJ0aWZpZWQ=?= | last post by:
Has anyone successfully used an Access query from .NET? I am trying to do this and am getting a weird error. .NET calls queries 'stored procedures'. The error I am getting says "Schema could not be...
2
by: k-man | last post by:
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
15
by: OzNet | last post by:
I have a query (with calculated fields) in Access (2007) and the data changes depending on the dates and staff person selected. I need to produce a series of graphs based on the data in this query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.