tags:

views:

90

answers:

3

I have a missing reference listed in my References list (in the VBA Code view). It's a reference to 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?

A: 

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.

Randolph Potter
I didn't think I could use the word "compile" three times in two sentences. Forgive my grammar.
Randolph Potter
+1  A: 

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

Irwin M. Fletcher
OCX's referenced in code will cause compile errors, but OCX's that are only embedded in controls on forms/reports won't throw any errors until runtime, i.e., when the form/report with the embedded OCX is opened.
David-W-Fenton
A: 

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.

Christian Payne
Why in the world would you think an Access app would go down while a programmer works on the front end? No competent developer lets users share a front end, nor distributes an unsplit app (with forms/reports and tables all in one monolithic file). And no competent developer would work on a live copy of the front end. Replacing the productiong front end with the fixed front end is not a big deal at all.
David-W-Fenton
Well, the Access App will go down from the users point of view. Open a form in design view, add an Acitve-X control. Save the form and close. Then unregister the control. David, what do you think will happen if you open the form again???
Christian Payne