How do you find unused objects?

  • Thread starter Thread starter Tony Ciconte
  • Start date Start date
T

Tony Ciconte

I have developed both Acc97 and Acc2002 database systems. I am sure
that there are a number of unused objects in these systems but am
unsure of how to find and safely delete them. Does anybody know a good
method and/or third-party product that can help?

Any and all assistance is appreciated.

Tony Ciconte
DSI
 
I've only just bought Total Access Analyser (I've got the horrible feeling,
now I've bought 4 FMS products, that I'm going to end up buying everything
they do, and then realise I've spent several 1000s of pounds more than I
would if I'd bought a bundle!).

It looks very useful. And seems especially Access-centric. I suppose it
would be. What I mean is spotting those little errors that are commonly
made. Missing error handlers, forms with the default caption etc. But as a
'this query isn't used anywhere, lets delete it' type tool I think it might
be a bit of blunt instrument. Use with care.

I think Speed Ferret is a good deal more thorough. I think it just works,
basically, on text searches. So if it find "qryMyQuery" as part of a built
up string, as Brendan gives as an example, it'll find it. In a year or so
I'll know better, but for now TAA and Speed Ferret together look like a good
combination.

As is not knocking up forms/queries/reports in a hurry to test something and
then forgetting to delete them afterwards! I look at a couple of apps I've
done and am horrified at how often things called qryTest1 or something end
up staying in the app. Especially if there are a lot of things depending on
it.

Stan Leszyinski has some good little naming tips in his 'Access 97 Expert
Solutions' book (published by Que, but out of print I suspect). Basically
trial objects are prefixed with and underscore - _qryKnockedUpInAHurry,
_frmJustTryingSomethingOut etc. Private ones that will be permanent but
hidden from users he prefixes with a z -
zfrmIUseForExaminingTheErrorLogTable. This is what I do. It's handy.
But....the problem is that 'trial' objects very often end up becoming
permanent ones. I've got some quite complex crosstab queries (well, they
seem complex to me), which are based on selects, which might be based on
other selects. If you start of naming them all with an underscore, decide it
all works fine, it's then a real pain to go through renaming them from the
bottom up. Unless there's an easy way anybody could let me know about. Same
for forms/subforms and the queries they're based on, ditto reports. My
advice is to use proper naming from the start, as though it's for real.

Of course I guess this is one of those things where good outline design
makes sense. We decide before we start building it what objects we will
need, and give them names at that stage. Because we'll never need to change
the design later on. Oh no. Not in a million years. No siree! Once I've
finished an application it never gets changed. Not a chance. Write that spec
then build the app in the next 3 months, without changing so much as a full
stop. That's how we all work. Isn't it?

Yours, Mike MacSween
 
Lyle Fairfield said:
Of course, if you'd written your own code to do these things, you might have
saved even more, you might have learned a lot, and you might have been able
to streamline the procedures to your own needs. What else? Well, then you
might have to put up with admonishments about posting it?

Is that what seperates a $15-$35 per hr. programmer from and a $65-$100 hr.
one?
Or is it the difference between Wal-Mart and Tank Henry's General Store?
Ebay and Lucy's Lovely Linens Online?
IBM and Jeff's Computer Repair?
 
rkc said:
Is that what seperates a $15-$35 per hr. programmer from and a $65-$100 hr.
one?
Or is it the difference between Wal-Mart and Tank Henry's General Store?
Ebay and Lucy's Lovely Linens Online?
IBM and Jeff's Computer Repair?

Well I'm in the first group. When I get into the 2nd group maybe I'll have
time to spend writing my own tools to do this sort of stuff. In the meantime
I'm quite happy shelling out a few dollars for functional tools that make
things easier.

Cheers, Mike MacSween
 
Would you have admonished him? Most of us here don't gripe if someone
mentions a product that is a solution for the question asked, even if the
mention is by the originator of the product. It's gratuitous, unsolicited
advertisments that mostly "draw fire". Maybe if Mike had developed those,
streamlined for his own use, he'd have posted them as freeware.

I wondered what Lyle was talking about. If that's what you were talking
about Lyle, you can see that it was Cheryl Fischer who first mentioned Total
Access Analyser, and me that followed it up with Speed Ferret. I don't think
that I work for either of the companies that make those products, though I
haven't checked recently. Anyway, the original post was asking about how to
find out if it's safe to delete unused objects. Both of those seem like
appropriate suggestions to me.

Mike MacSween
 
I wondered what Lyle was talking about. If that's what you were talking
about Lyle ....

I find this post insulting, to the extreme, Mike. Perhaps, you'll wonder what
I am talking about, again. Perhaps, some day I'll explain. Perhaps, I won't.
 
I'm not sure that I fully understand the comment about 'admonishment'
myself, Lyle. Larry obviously thought you were referring to admonishments
about advertising, but on reflection I think you may have meant that someone
who posted such code might be admonished because some might feel that such
code might potentially be unsafe or harmful in the wrong hands?

BTW: I don't believe any insult was intended. Gratuitous insult is just not
something Mike does.
 
Lyle Fairfield said:
I find this post insulting, to the extreme, Mike. Perhaps, you'll wonder what
I am talking about, again. Perhaps, some day I'll explain. Perhaps, I
won't.

What on earth are you talking about Lyle? Save us the cryptic comments, just
tell us.

Mike
 
I'm not sure that I fully understand the comment about 'admonishment'
myself, Lyle. Larry obviously thought you were referring to
admonishments about advertising, but on reflection I think you may have
meant that someone who posted such code might be admonished because some
might feel that such code might potentially be unsafe or harmful in the
wrong hands?

I meant that one who posted such code could be admonished by those who sell
utilities with the same purpose (as the code).
BTW: I don't believe any insult was intended.

Nor do I.
Gratuitous insult is just not something Mike does.

No, it's not.
 
What on earth are you talking about Lyle? Save us the cryptic comments,
just tell us.

Mike

In my opinion, it's entirely inappropriate to speculate on Poster A's
message based on Poster B's deliberate misinterpretation of it.

As I pointed out to Brendan, persons who post utility code here may be
admonished by those who sell such utilities.

I think the functionality of most of the utilities about which I read can
be duplicated with a few hours of careful thought and coding. An Access
file is a bag of bytes. There are no magic ways of working with it. Its
objects and their properties, and its methods are transparent. The capable
programmer will be just as able to organize, filter, identify, and modify
these entities as any utility is. And he/she will be able to tailor a
solution to meet his/her specific requirements.
 
Several years ago I took a VBA training class from Rick Jones
(http://www.rickworld.com/) in San Francisco. I believe he was
teaching on the side for Appdev. He mentioned Speed Ferret (SF) and a
few other utilities that were capable of search/replace. He also
mentioned a product (add in) he designed and was for sale. About two
years ago we bought SF and used it for a few months. I decided to get
in touch with Rick and get his product - which we did.

More: I am sure a developer could design a utility that does the sort
of thing Rick's product does, but I did not have the luxury of
spending time on this. We really like his product (not pretty, but
functional), but it can do most (if not all + more) what SF can do as
well as cross-ref checking and is far less expensive at $37.

Finally, rest assured that I am in no way involved with Rick's
business. I merely wanted to share information with the group about a
product that I think is very useful.

Bob
(e-mail address removed)
 
Lyle Fairfield said:
I meant that one who posted such code could be admonished by those who sell
utilities with the same purpose (as the code).

Well, that's the way this business goes, isn't it. Hopefully, you make
enough money from selling your product to invest enough time in improving it
that it is better than anything that can be obtained for free. If not, then
its probably time to find a new product.

I've never worried about posting any of my code. I know I'll write better
code tomorow, and the code is really only one small component in what we do.
Our understanding of our clients' needs, and on-going support, are at least
as important as the code.
 
Mike MacSween said:
I'm sure this is one of those things that needs to be done one step at a
time. Backup, look for usused object, delete it, make a note of what you
deleted, test, backup again. Then all over again.

FWIW I rename such objects as "z yyyymmdd original name". After a
month or so I delete it or import it into an archive MDB.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Back
Top