Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Uppercase by position in field

Discussion in 'Information Technology' started by eighthman11, Jul 28, 2006.

  1. eighthman11

    eighthman11
    Expand Collapse
    Guest

    Is there a way to uppercase a letter by position. For example I want
    to upper case any character that follows a period "." in a field.
    Thanks for any help.
     
  2. Loading...


  3. Phillip Windell

    Phillip Windell
    Expand Collapse
    Guest

    What happens when it takes the sentence,
    "John S. went down the street",
    and turns it into,
    "John S. Went down the street"?

    Phil

    "eighthman11" <rdshultz@nooter.com> wrote in message
    news:1150836539.260289.242300@y41g2000cwy.googlegroups.com...
    > Is there a way to uppercase a letter by position. For example I want
    > to upper case any character that follows a period "." in a field.
    > Thanks for any help.
    >
     
  4. Graham Mandeno

    Graham Mandeno
    Expand Collapse
    Guest

    Use the AfterUpdate event of the textbox control on your form. There you
    can perform any kind of "cleanup" operations on the data and change it in
    whatever way you like.

    For example, the following code will uppercase any character preceded by a
    ".":

    Dim iPos As Integer
    iPos = 1
    Do
    iPos = InStr(iPos, MyTextbox, ".")
    If iPos = 0 Or iPos = Len(MyTextbox) Then Exit Do
    iPos = iPos + 1
    Mid(MyTextbox, iPos, 1) = UCase(Mid(MyTextbox, iPos, 1))
    Loop

    --
    Good Luck!

    Graham Mandeno [Access MVP]
    Auckland, New Zealand

    "eighthman11" <rdshultz@nooter.com> wrote in message
    news:1150836539.260289.242300@y41g2000cwy.googlegroups.com...
    > Is there a way to uppercase a letter by position. For example I want
    > to upper case any character that follows a period "." in a field.
    > Thanks for any help.
    >
     
  5. eighthman11

    eighthman11
    Expand Collapse
    Guest

    Hey Graham thanks for taking the time to help. I'm putting in the code
    now to give it a try. You're a life saver.



    Graham Mandeno wrote:
    > Use the AfterUpdate event of the textbox control on your form. There you
    > can perform any kind of "cleanup" operations on the data and change it in
    > whatever way you like.
    >
    > For example, the following code will uppercase any character preceded by a
    > ".":
    >
    > Dim iPos As Integer
    > iPos = 1
    > Do
    > iPos = InStr(iPos, MyTextbox, ".")
    > If iPos = 0 Or iPos = Len(MyTextbox) Then Exit Do
    > iPos = iPos + 1
    > Mid(MyTextbox, iPos, 1) = UCase(Mid(MyTextbox, iPos, 1))
    > Loop
    >
    > --
    > Good Luck!
    >
    > Graham Mandeno [Access MVP]
    > Auckland, New Zealand
    >
    > "eighthman11" <rdshultz@nooter.com> wrote in message
    > news:1150836539.260289.242300@y41g2000cwy.googlegroups.com...
    > > Is there a way to uppercase a letter by position. For example I want
    > > to upper case any character that follows a period "." in a field.
    > > Thanks for any help.
    > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page