Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Question Changing table names from lowercase to uppercase

    Hello,



    I was searching for some way that I could change all the tables from lowercase names to uppercase. I guess I should have just done all uppercase to begin with but I try to use lower case for everything to keep from having confusion.
    I am using Access 2007.
    Thanks in advance. Any help would be great. I can't find anything other than an SQL reference to alter table.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    see if this puppy works for ya:
    Code:
    Function TablesToUCASE()
    
    On Error GoTo ErrorHandler
    
            Dim db As Database
              Set db = CurrentDb()
                Dim tbldef As TableDef
    
        For Each tbldef In db.TableDefs
    
          If Not tbldef.Name Like "msys*" Then
            If Not tbldef.Name Like "~tmp*" Then
    
                tbldef.Name = UCase(tbldef.Name)
    
            End If
          End If
    
        Next tbldef
    
    RefreshDatabaseWindow
    
    ErrorHandler:
      Exit Function
    
    End Function

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Changing names and labels
    By Geewaagh in forum Reports
    Replies: 29
    Last Post: 04-20-2010, 10:26 PM
  2. Variable Table Names in a Module
    By Jessica in forum Modules
    Replies: 1
    Last Post: 04-19-2010, 07:38 PM
  3. Changing field names in queries
    By scottsoo9 in forum Queries
    Replies: 1
    Last Post: 12-01-2009, 05:47 PM
  4. Uppercase to Lowercase
    By tigers in forum Reports
    Replies: 1
    Last Post: 09-28-2009, 10:48 AM
  5. Query to get column names in a table
    By access in forum Forms
    Replies: 1
    Last Post: 07-01-2009, 02:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums