Results 1 to 6 of 6

Thread: Capital

  1. #1
    Capital Guest

    Default Capital

    Is there a way to capitalise the first letter of example a Name returned in the RecordSet from an Access DB. I know that in Oracle you can use Initcap, but is there any such function with Access, or how would I do it with VBScript???<BR><BR>Thanks

  2. #2
    Mike SHaffer Guest

    Default RE: Capital

    RTFineM<BR><BR>Functions:<BR><BR>ucase()<BR>lcase( )<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Capital

    that makes the entire name ucase & lcase!! i do it this way:<BR><BR>&#060;%<BR>var1=Left(rs("field"),1)<BR >var2=ucase(var1)<BR>var3=Right(rs("field"),Len(rs ("field"))-1)<BR>finalvar=var2&var3<BR>%&#062;<BR><BR>this is probably the long way, but it works...

  4. #4
    Mike Shaffer Guest

    Default I wasn't stating that the ucase function alon

    &nbsp;<BR>strNew = ucase(left(strOld, 1)) & mid(strOld, 2)<BR>

  5. #5
    Join Date
    Dec 1969

    Default RE: Capital

    No function that I know of, but you can make one easily.<BR><BR>Name = InitCap(Name)<BR><BR>Function InitCap(nm)<BR> FirstLetter = UCASE(Left(nm, 1))<BR> RestOfString = LCASE(Mid(nm, 2))<BR> NewString = FirstLetter & RestOfString<BR> InitCap = NewString<BR>End Function<BR><BR>This has not been tested and there are probably better ways to do it, but you get the point

  6. #6
    Capital Guest

    Default Thanks


Posting Permissions

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