cleaning up strings in Access

Results 1 to 5 of 5

Thread: cleaning up strings in Access

  1. #1
    Michelle Brown Guest

    Default cleaning up strings in Access

    Hi everyone, I am trying to write a quick update query in Access 2000 that will reformat some data for me.<BR><BR>People enter their names on a webform...those are later used for name tags. They can enter their names in all caps or lowercase or whatever, but they need to be formatted to first letter cap, rest lowercase to look nice for the nametags.<BR><BR>anyone have an idea how I can do this quick and easy?<BR>I tried using lcase to make them all lowercase<BR>and then use (ucase(left(firstname, 1))) but the left just cuts everything but the first number.<BR><BR>thanks in advance<BR>-Michelle

  2. #2
    Join Date
    Dec 1969

    Default Doing Proper Capitalization

    This works *either* in an Access query *or* in VBScript after you retrieve the data:<BR><BR>UCase( Left(firstname, 1) ) & LCase( Mid(firstname, 2) )<BR><BR>(should have asked you-know-where...would have gotten answer from lots of people)

  3. #3
    Charlie Pyne Guest

    Default RE: cleaning up strings in Access

    Double check my parentheses, but this should work....<BR><BR>(UCASE(LEFT(firstname, 1))) + <BR>LCASE(RIGHT(firstname, (LEN(firstname) - 1)))

  4. #4
    Join Date
    Dec 1969

    Default RE: cleaning up strings in Access

    Try this...<BR><BR>namearray = split(name, " ")<BR>name = ucase(left(namearray(0),1)) & lcase(mid(namearray(0), 2)) & ucase(left(namearray(1),1)) & lcase(mid(namearray(1), 2))<BR><BR>You only need the subscript 0 portion (and skip the split) if you only have one name

  5. #5
    Curtis Guest

    Default HEY BILL!

    just thought I&#039d drop in and see what&#039s new... and thought maybe you&#039d want to see the site I was working on.. <BR><BR><BR>I made the intro, history, personnel and support page so far on there.. the rest was done before I started working at this company "DSI"... but I tried to make things that fit with the already existing "color scheme" and layout.. and not to forget the "simplistic" approach that was taken before to make it user friendly.. it&#039s not the "greatest" site.. but it&#039s quite large if you look through everything.. but like I was saying.. I FINALLY TOOK UP FLASH AND SHOCKWAVE.. AND I ABSOLUTELY LOVE IT AND WILL NEVER USE ANYTHING ELSE, UNLESS i HAVE TO DO SOME DATABASE STUFF AGAIN, BUT HOPEFULLY NOT FOR AWILE ATLEAST.<BR><BR>I was just messing around with the intro... I will be probably redoing the whole site after I start and finish this other one that my boss will be asking me to direct my attention to probably before the end of the month..<BR><BR>it will be called HI-Network (hotel information network).. this is a pretty successful company.. we have clients such as NASA and AMERITECH and a few other big ones.. including the ARMY or some MILLITARY business or something... I&#039m not sure... but we have quite a few "references" I guess you could say...<BR><BR>anyways.. as I was saying at the beginning, I just stopped by to say hi, and tell ya that I&#039m doing okay now, and that everythings great and my job is more than secure, and I have not done ANYTHING here that I can really say, "I tried", but it impressed the boss and the others that work here, so I guess that has now created a security that I have been waiting to feel.<BR><BR>I have so much more talent to put into my work that I&#039m saving for this page that I&#039ll be starting on probably next month, and it will make this DSI page look like it was made by monkeys :)<BR><BR>I just did what I was asked. This time I get to design it all from start to finish, so it will be pretty nice I am predicting by the time it&#039s done so I will send you the URL to that site when it gets under way... so you can see who you were helping, and hopefully it will give you a feeling of a job well done when it&#039s finished, because I kind of look at you, gmny and eric banker from EASYASP.ORG as my judges or panel of experts in which I have to impress.. hehe.. but this DSI page is nothing compared to what I can do... I just had to keep it simple, because I don&#039t want the boss to "know" what I&#039m capable of, so that he doesn&#039t swamp me with things i don&#039t want to have to worry about yet.. such as redesigning the whole site with flash, because I know I&#039m going to have to do that sooner or later... and I will take it real seriously and spend night and day for a month doing it to make it "my portfolio example" for if I ever need another job, so I can use it as my "reference" to prove myself to my "interviewer". <BR><BR>Well.. I guess I should let you get back to what you do best.. and I&#039ll ttyl bud.. thanks for your help again.. and I appreciate it...

Posting Permissions

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