PDA

View Full Version : Solved: Table Last Access date



BrianMH
07-16-2012, 01:15 AM
Hi,

Does anyone know if there is any way to tell when a table was last accessed/read from?

Failing that is there an easy way to implement a log of table accesses even if done through sql or vba?

I have an access database with lots of redundant tables but before deleting them I want to ensure they are not in use at all.

Thanks

hansup
07-16-2012, 06:10 PM
Access doesn't provide the ability to determine when a table was last viewed ... unless there is something new in Access 2010 which I haven't heard about.

Rolling your own logging capability would be challenging because it would need to account for tables opened directly in datasheet view, referenced by queries, referenced in VBA code modules, used as the data source for forms, in the row sources of combo and list boxes, in expressions used as the control source for text boxes ... and on and on.

I think the simplest approach would be to rename the tables you suspect are no longer in use. Then test the application to see what breaks.

If that is too crude, you could inspect queries, code modules, forms, reports and so forth to see where each table name appears. That would be a lot of work. I'm not aware of any tools which have been created for that purpose; perhaps you can turn up something by searching the web.

BrianMH
07-18-2012, 02:13 AM
Thought that might be the answer.

Thanks