How do I find where a missing reference is used in MS Access
I have a missing reference listed in my References list (in the VBA Code view). It's a reference to 开发者_StackOverflow中文版an OCX for a product that we no longer use.
I'm fine with removing(unchecking) the reference, but I'm wondering if that is going to come back to bite me.
Is there a way to find out in which forms/reports it might have been used?
Is removing it and then doing a compile of the MDB sufficient?
I believe if you are using Option Strict, then the compile should catch any issues where you have referenced an object that no longer exists
The compile might not catch it if it's using late binding, but usually it'll catch it in the compile. You can also do some testing by running the recompiled MDB.
If the product is a control, then Access doesn't (by default) let you look at the "source" like that.
Otherwise I would do a search in the VBA code to see where it is created. eg:
Dim p as New Old_Product
Then do a search for Old_Product across the project.
Depending on how mission critical your application is, I would remove it and see what happens.
I'm assuming that you have decommissioned the old product?
In my experience, Access Applications aren't mission critical. If they go down for an hour (while you try and fix the old reference) it isn't the end of the world.
精彩评论