Results 1 to 9 of 9
  1. #1
    tobbe_b is offline Novice
    Windows 11 Access 2013 64bit
    Join Date
    Aug 2025
    Posts
    3

    Locating unused fields

    Hi,

    I'm new here and new to Access. I think I've understood that locating unused fields is not a feature in Access.



    Do you have ny golden tips for me? Is there any way of doing this? I'd like a clean table when sending up the project to my costumer.

    Thanks!

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    Your requirement is not clear enough to suggest a solution.

    Provide an example of what you mean - an example of data in the table where fields are not used and the output that you want from that data to send to the customer. Also confirm how you are sending the table - as an excel or csv file, a pdf? A table in an email? Something else?

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Be a bit more methodical. If you remove a control and no longer need the field, remove it there and then.

    You could iterate through all tdfs for the fields, but not sure how to check objects to see if they name was used.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    As I interpret it, the requirement is to ensure that all tables have no data. Maybe that's not correct. If it is, then you should have had a backup of the tables before you started putting test data in them. Now you will have to run delete queries against them all, or write code that loops through all tables and runs a delete sql statement against them.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    tobbe_b is offline Novice
    Windows 11 Access 2013 64bit
    Join Date
    Aug 2025
    Posts
    3
    Thanks for replying, guys...

    So yea, I wasn't too good at keeping track of this from the begining (which I of course should have), but the problem now is that there are too many fields in the tables which aren't in use at all in any of the forms, queries or reports.
    I mean, it's not super the end of the world if I do not manage to remove these, it's more of a quality principle, from my point of view.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    You could perhaps try the Database Documenter?

    Also have a look here

    A bit deeper here
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    The links provided by Welshgasman are a good start but a lot depends on your app and how well it is built

    For example if you have the same field name in multiple tables - you will get erroneous results
    You may have code that sets a recordsource and populates controlsources - that might return erroneous results since the controlsources either won't be populated or populated wiht the wrong names.
    You may be using domain functions that references the field
    You may have queries that reference the field (perhaps in criteria) but doesn't return it
    Hopefully you do not use lookup/multiselect fields in your table design

    Whether you use the examples or not, I would disable auto update and rename all suspect fields with a prefix of 'zz'. Then run the app testing all facets - form/report events, queries and modules + macros if you use them. Any errors such as 'field not found', means you need to remove the prefix.

    Also take a look at @isladogs Database Analyser here - https://www.isladogs.co.uk/database-...pro/index.html

  8. #8
    tobbe_b is offline Novice
    Windows 11 Access 2013 64bit
    Join Date
    Aug 2025
    Posts
    3
    Quote Originally Posted by Welshgasman View Post
    You could perhaps try the Database Documenter?

    Also have a look here

    A bit deeper here
    Great, this worked well. I altered the code to print diferently though and create a log of it all. Thanks a lot Welshgasman and GPT! <3

    Feel free to use: https://pastebin.com/W5nYn1Fr

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Post 8 was moderated, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 05-19-2022, 03:34 PM
  2. Replies: 5
    Last Post: 03-21-2015, 01:42 PM
  3. Replies: 8
    Last Post: 01-30-2014, 01:43 PM
  4. Deleting unused subs
    By snipe in forum Programming
    Replies: 2
    Last Post: 12-20-2013, 01:57 PM
  5. Queries for determining unused amounts of assets/cash
    By Long Tom Coffin in forum Queries
    Replies: 8
    Last Post: 07-05-2012, 01:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums