Advertisement

05.16.2008 at 11:19AM PDT, ID: 23409285
[x]
Attachment Details

VBA to remove spaces from table and field names

Asked by schmir1 in Access Coding/Macros

Tags: , ,

In preparing to migrate to SQL Server, I need to write some code that would remove the spaces from table and field names.  Here are the requirements:

From VBA in the front-end, go through each table in the back-end and substitute an underbar for a space
    For example: BOM Parts becomes BOM_Parts
From VBA in the front-end, go through each table link (also in the front-end) and substitute an underbar for a space
    For example: BOM Parts becomes BOM_Parts
For each table name, go through my code (recordset stuff) and rename all references
    For example: [BOM Parts] becomes [BOM_Parts]
For each table name, go through my queries and rename all references
    For example: [BOM Parts] becomes [BOM_Parts]
For each table name, go through my form and report properties and rename all references
    For example: BOM Parts becomes BOM_Parts
Do the above for all fields with the addition of changing all # to num
    For example: Component # becomes Component_Num

Does this sound doable?  
Start Free Trial
[+][-]05.16.2008 at 11:26AM PDT, ID: 21585199

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: Microsoft, Access, 2000
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.16.2008 at 11:28AM PDT, ID: 21585214

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 11:31AM PDT, ID: 21585239

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 11:36AM PDT, ID: 21585287

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 11:37AM PDT, ID: 21585302

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 02:32PM PDT, ID: 21586620

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 02:40PM PDT, ID: 21586667

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628