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

input mask to capitalise first letter of surname

Discussion in 'Information Technology' started by mardoh, Nov 17, 2005.

  1. mardoh

    mardoh
    Expand Collapse
    Guest

    How do I set the properities of a surname field in a table to create an input
    mask that will capitalise the first letter of each surname?
     
  2. Loading...


  3. xRoachx

    xRoachx
    Expand Collapse
    Guest

    LOL, no problem. For the future, search the access help file for "Input
    Mask". You'll find some good examples.

    "mardoh" wrote:

    > Brilliant xRoachx!!! I've been tearing my hair out for the past few days
    > over this one! Thanks again from the "nearly bald lady"!!!
    >
    > "xRoachx" wrote:
    >
    > > Try the following:
    > >
    > > >L<?????

    > >
    > > The L indicates the first digit is required and must be a letter and the >
    > > ensures it is capitalized. The ? indicates the following digits are optional
    > > but are lower case letters. Also, be sure to include enough ? for the length
    > > of your field.
    > >
    > > "mardoh" wrote:
    > >
    > > > How do I set the properities of a surname field in a table to create an input
    > > > mask that will capitalise the first letter of each surname?
     
  4. mardoh

    mardoh
    Expand Collapse
    Guest

    Brilliant xRoachx!!! I've been tearing my hair out for the past few days
    over this one! Thanks again from the "nearly bald lady"!!!

    "xRoachx" wrote:

    > Try the following:
    >
    > >L<?????

    >
    > The L indicates the first digit is required and must be a letter and the >
    > ensures it is capitalized. The ? indicates the following digits are optional
    > but are lower case letters. Also, be sure to include enough ? for the length
    > of your field.
    >
    > "mardoh" wrote:
    >
    > > How do I set the properities of a surname field in a table to create an input
    > > mask that will capitalise the first letter of each surname?
     
  5. xRoachx

    xRoachx
    Expand Collapse
    Guest

    Try the following:

    >L<?????


    The L indicates the first digit is required and must be a letter and the >
    ensures it is capitalized. The ? indicates the following digits are optional
    but are lower case letters. Also, be sure to include enough ? for the length
    of your field.

    "mardoh" wrote:

    > How do I set the properities of a surname field in a table to create an input
    > mask that will capitalise the first letter of each surname?
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 16 Nov 2005 13:15:08 -0800, mardoh
    <mardoh@discussions.microsoft.com> wrote:

    >How do I set the properities of a surname field in a table to create an input
    >mask that will capitalise the first letter of each surname?


    xRoach's suggestion will work...partially. It will capitalize only the
    first LETTER of the field, and lowercase the rest - and that only as a
    display, not changing what's actually stored. This will give you
    values like Mcdonald (for McDonald), Van der steen (for van der
    Steen), and Smith-hawken (for Smith-Hawken).

    You may want to use some VBA code in the Form control's AfterUpdate
    event ( you do need a form, tables have no usable events):

    Private Sub txtSurname_AfterUpdate()
    If StrComp(Me!txtSurname, LCase(Me!txtSurname), 0) <> 0 Then
    Me!txtSurname = StrConv(Me!txtSurname, vbProperCase)
    End If
    End Sub

    This will leave mixed case fields alone, but will take names in all
    lower case and convert them to Proper Case (Each Word Capitalized,
    Including Hyphenated-names).

    John W. Vinson[MVP]
     
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