Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2010
    Posts
    3

    Question Unanswered: 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
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why would you want to?
    Microsoft systems are not case sensitive, where as *NIX are. so unless you are accessing a JET/Access db from a *NIX server I can't see how it will make any difference

    I wouldn't bother personally, but learn from this experience so next time your develop a db use some form of naming convention
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    As Healdem pointed out, this is kind of useless, but if you really want to do it, here is one solution, among several others:

    Code:
    Function TblNameUppercase()
    
        Dim dbs As DAO.Database
        Dim tdf As DAO.TableDef
        
        Set dbs = CurrentDb
        For Each tdf In dbs.TableDefs
            If Left(tdf.Name, 4) <> "MSys" Then tdf.Name = UCase(tdf.Name)
            dbs.TableDefs.Refresh
        Next
        Set tdf = Nothing
        
    End Function
    Have a nice day!

  4. #4
    Join Date
    Sep 2010
    Posts
    3
    Thank you for your reply and thanks for the code Sinndho.
    I could care less about the case of the text myself and like I said I like using lower case for names. But the Teacher declared after I started that he wanted us to use all uppercase or camel case. This left me with the aggravation of either going and renaming them by hand or recreating the whole database.
    I was also sure that there must be some way to do this. I knew in VB that there was a method to convert case so I figured there must be a loop and a way to reference the tables so that you could use the uppercase function.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so tell the teacher If he/she/it cannot provide the specification for the required piece of work, its about time they learned too or gave up the job.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Sep 2010
    Posts
    3
    Quote Originally Posted by healdem View Post
    so tell the teacher If he/she/it cannot provide the specification for the required piece of work, its about time they learned too or gave up the job.
    I whole heartedly agree with you. He will tell us one thing then turn around later and tell us that it is wrong and why. And like you said he should have given us the specifications for the database design in the syllabus.

    I am very interested in learning proper design and theory but he is aggravating to work with. Almost everything we say is always wrong. I even asked him for his data dictionary and he said no. I told him it would be a lot easier that way so that we know what the heck he wants the database to look like.

  7. #7
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Perhaps the instructor is trying to demonstrate the concept of "scope creep!"

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •