Updating Code

Changing the name of an object in Access is a real pain. That's because Access doesn't update all your references; you must do that yourself. Invariably you miss a few, and they'll eventually cause trouble. Fortunately, updating these references in your modules is fairly easy. Simply use the Replace feature.

Open your module and click the Find button on the Visual Basic toolbar. Enter the object's original name in the Find What control and then click the Replace button. In the resulting window, enter the object's new name in the Replace With control. Then click Find Next to run the feature. Access highlights each occurrence of the original name and asks if you want to replace it. Updating object names this way is quick and thorough.

Just be sure to open and search each module.

Access Index

Main Index

Search RD Techbase