Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Charleston, SC
    Posts
    11

    Unanswered: Is there a way to determine unused tables/queries?

    I am taking over an undocumented Access database, and I know there are quite a few tables and queries that are no longer referenced. Is there any way to easily tell if a table or query is not referenced by a form or report?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Not sure about referenced, but you can find the last modified date;

    You could change the views to details then you should be able to see creation date or modified, lastupdated date..

    Or if you like modules I wrote this for you..


    Debug.Print "Tables:"

    For T = 1 To CurrentDb.TableDefs.Count - 1

    Debug.Print " "; CurrentDb.TableDefs(T).LastUpdated; " > "; CurrentDb.TableDefs(T).Name

    Next

    Debug.Print "Queries:"

    For q = 1 To CurrentDb.QueryDefs.Count - 1

    Debug.Print " "; CurrentDb.QueryDefs(q).LastUpdated; " > "; CurrentDb.QueryDefs(q).Name

    Next


    If you open your debug window, it should show all tables and queries.

    Be warned that the tables that begin with MSys and the queries that start ~sq_ are system ones..Don't delete them !!!

    Hope it helps you..
    Last edited by Ken_Hart; 03-09-04 at 11:00.

  3. #3
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Also !!!

    Dont delete anything straight away...

    Whenever I get given a database to manage I copy it somewhere else and then if anything that has been removed is required, I can always import a copy back in.

    Never delete stuff without a backup...

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Is there a way to determine unused tables/queries?

    Originally posted by texassprite
    I am taking over an undocumented Access database, and I know there are quite a few tables and queries that are no longer referenced. Is there any way to easily tell if a table or query is not referenced by a form or report?

    Thanks
    Not really ... Another way would be to switch over to debug mode and do brute force searches thru the entire project looking for the tables and queries ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •