Updating VBA when control name changes

SaviorSix

Registered User.
Local time
Today, 03:17
Joined
Mar 25, 2008
Messages
71
Hello, apologies if this has been asked before, I have tried several searches.


My question: Is there any way for my VBA code to update when I change a control name.

Currently, If I have written a click event handler for, say, Text43, and then change the control name to txtEntry, I need to re-create the event by going back into the properties, making a new event procedure, and copying the code from Text43_OnClick into txtEntry_OnClick.

Even if I pre-emptively change the VBA code to txtEntry_OnClick, and THEN change the control name, I still need to go into the properties, and click the ellipsis to "re-create" the link between the control and the code.

I know the ideal solution is to name all the controls their permanent name before writing the code, but sometimes this doesnt happen.

Is there any easier way to do this? Or is it just one of the traits of Access 2003?
 
I'm not sure if you can do this automatically, but what you can do is use the find and replace tool in the VBA illustrator to replace all of the old control names found with the new one that you changed it too. You can use this tool within a single procedure, module, or even an entire project. It's a 10 second task. Check it out.
 

Users who are viewing this thread

Back
Top Bottom