Rename Forms, lots of VBA

gunslingor

Registered User.
Local time
Today, 02:20
Joined
Jan 13, 2009
Messages
50
My DB has a front end and a back end. There are currently about 10 tables and 5 forms and roughly 1000 lines of code.

All my table names are like this, for example: CYBER_ASSETS, MFR_MODELS, IP_ADDRESSES

All my form names are like this, for example: VIEW_CYBER_ASSETS, EDIT_CYBER_ASSETS, NEW_IP

This happened because a unexperienced contractor started this DB, now I've rebuilt a good portion of it and its my responsibility to finish development.

I want my table names to look like this: tbl_Cyber_Assets, tbl_Mfr_Models, tbl_IP_Addresses

I want my forms to look like this: frm_View_Cyber_Assets, frm_Edit_Cyber_Assets, frm_New_IP

However, I have tons of code and a lot of strings that define SQL statements and I am sure if I just rampage thru and change the names in the backend and relink that I'll break EVERYTHING!

Is there an easy way to do this? Am I being to picky? Should I just shutup and maintain the existing format or should I spend lots of time finding and replacing names in my code?

Thanks Peeps
 
Is this operational? Or at least working? If so, then how will you justify expending the effort on renaming/retesting but not adding any functionality? If you plan some huge expansion of thís application then perhaps, but otherwise just bite the bullet and live with it. IMHO! :D
 
Perhaps rename it one table at a time, then search the code for its uses.

I think where GUI objects are linked, then the GUI objects should NOTICE the CaSe ChAnGe.

1000 LOC's is not much... the application I am working on for one client is past 92,000 LOC's at this point! :cool:
 
The free V-Tools has a great feature called Total Deep Search and it can replace on object names. I use Rick Fisher's Find & Replace at work (costs ~U.S. $40) and it works great for things like this.
 
hmm.. okay, I'll try out those tools. And I'll give an effort to some sort of find/replace effort... with a backup taken first of course =).

Thanks guys@@
 
I also have this Problem rigth now :( With 25 Tables and 19 Forms and with that thousands of VBA lines it :banghead:

Everithing is working fine but I´m planing to expant the DB and for that the Standard Prefixes would be good to have sa little overlook of all the things in it.

Now I regret all the things I didn´t do at the begining :( but all that started just like a expendet Excel Table with some more funktionalities.

I´m a noob with Access and by checking and editing old codes and names of tables/forms I often come over so stupid things :confused: I´ve don in the past :rolleyes:

In one month I´ll lough over thing I´m making rigth now :o
 
I also have this Problem rigth now :( With 25 Tables and 19 Forms and with that thousands of VBA lines it :banghead:

Everithing is working fine but I´m planing to expant the DB and for that the Standard Prefixes would be good to have sa little overlook of all the things in it.

Now I regret all the things I didn´t do at the begining but all that started just like a expendet Excel Table with some more funktionalities.

I´m a noob with Access and by checking and editing old codes and names of tables/forms I often come over so stupid things I´ve don in the past

In one month I´ll lough over thing I´m making rigth now

I find it useful to rebuild my code, regardless of environment, from time to time. I don't mean starting from scratch, I mean like rebuilding an engine. Start with a new database, import each table from the old one checking everything along the way... same with the code... forms are a little harder to approach this way.

I was hoping there was something that would let me change the file names and automatically change the code, but that was just wishful thinking
:banghead::banghead::banghead::banghead::banghead::banghead::banghead:
 
I was hoping there was something that would let me change the file names and automatically change the code, but that was just wishful thinking
As Bob suggested, Find and replace will do what you need to do. You will have to do it one name at a time though. If there is some consistant mistake you made, you could write your one code to loop through the Access objects and rename them but from your description, it sounds like a one at a time task. Just allocate a day or two and get it done. You might consider "unsplitting" the database so that you can do everything in one database rather than having to work with both the FE and BE but if the app is in production, you would have to shut the users out while you were making the name changes. You would probably have to start at end of day on Friday and work all weekend until it is done.

A trick that would help you if you can't shut the users out while you change both the FE and BE is to change the BE and then in the FE create a query for each table that uses alias' to convert the new names back to the old names. Using this technique, you could change the BE one table at a time.
 

Users who are viewing this thread

Back
Top Bottom