Input Mask in Access 97

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    Input Mask in Access 97

    I want to use an input mask to force the first letter of a field to be a
    capital, then have the rest of the field be as entered. By using the > sign
    before the first, then the < sign before the rest, I can almost accomplish
    this. However, this forces all the rest of the entry to lower case so I can't
    enter a name like McDonald. Any advice on how I can do this? Thanks.

    Bob

  • fredg

    #2
    Re: Input Mask in Access 97

    On Thu, 20 May 2004 19:00:05 GMT, Bob wrote:
    [color=blue]
    > I want to use an input mask to force the first letter of a field to be a
    > capital, then have the rest of the field be as entered. By using the > sign
    > before the first, then the < sign before the rest, I can almost accomplish
    > this. However, this forces all the rest of the entry to lower case so I can't
    > enter a name like McDonald. Any advice on how I can do this? Thanks.
    >
    > Bob[/color]
    You are using a form for data entry, I hope.
    Don't bother with a mask.
    Let the user enter the name with or without the first letter
    capitalized.
    Code the Control's AfterUpdate event:
    [ControlName] = UCase(Left([ControlName],1)) & Mid([ControlName],2)

    mcDonald and McDonald becomes McDonald.
    --
    Fred
    Please only reply to this newsgroup.
    I do not reply to personal email.

    Comment

    • Bob

      #3
      Re: Input Mask in Access 97

      In article <112y7rudi1bbt. gb4ukznbgpqs.dl g@40tude.net>,
      fgutkind@exampl e.invalid says...
      Fred,
      Thanks, your code works fine. I had to put it in a Macro because for some
      reason it doesn't work in an expression for my unbound control. Thanks again.

      Bob
      [color=blue]
      >You are using a form for data entry, I hope.
      >Don't bother with a mask.
      >Let the user enter the name with or without the first letter
      >capitalized.
      >Code the Control's AfterUpdate event:
      >[ControlName] = UCase(Left([ControlName],1)) & Mid([ControlName],2)
      >
      >mcDonald and McDonald becomes McDonald.
      >--
      >Fred
      >Please only reply to this newsgroup.
      >I do not reply to personal email.[/color]

      Comment

      Working...