Many thanks for that but I can't see my boss allowing me to spend $299 on
this package which will probably only be used once or twice. Although messy I
might just have to leave it as it is and be more aware of this if I write any
more databases in future.
I'd second Doug's recommendation of TAA. I use it regularly and have found it to be a pretty good tool, but you're right
- it is pricey for a one or two time use.
As an alternative, you could add some sort of "logging" feature that would show when each form/report is opened, then
let the db run for a month or so, then review that log and see what forms are being used. Something like this:
tObjectLog
------------------
ColumnName DataType
------------------------------------
lID AutoNumber (PK - this field is optional)
sName Text
iType Numeric
dTimeStamp Date
Now add a function in a Standard Module:
Function LogObject(ObjectName As String, ObjectType As AcObjectType) As Boolean
CurrentDb.Execute "INSERT INTO tObjectLog(sName,iType,dTimeStamp) VALUES('" & ObjectName & "'," & ObjectType & ",#" &
Now & "#)"
End Function
Now add this to the Open or Load event or your Forms/Reports:
Sub Form_Open()
LogObject Me.Name, acForm
End Sub
Obviously, change the acForm to acReport when needed.
Once you're satisfied that a form/report is no longer being used, then rename it and make sure nothing breaks ... if,
after another day/week/month you get no errors, the remove it from the database (obviously keep a backup just in case
something happens down the road).
This won't help with queries, of course, but it will pare down those unneeded forms/reports, and you can then review any
queries used on those forms/reports to see if you can remove queries.
Alternatively, you could search the codebase to see if a query is being used. Rick Fishers Find & Replace utility is a
good one (
http://www.rickworld.com/products.html) although I've used the one in mztools (
www.mztools.com) with good
success (and it's free, and has a LOT of other great goodies!!).
Note that if you've used Macros, I don't know if the mztools search feature will do any good ... don't know about F&R,
but the literature does say it searches Macros. Of course, you really shouldn't be using macros anyway ...
Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com