Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Input mask question (Access 2003)

    Hi,

    Is it possible to create an input mask to force the first two letters of the following code to be uppercase, but then the rest must be upper or lower case based on the user.
    For example in the codes: KH-Hdd, JH-gfs, GT-swT, FG-JHt.

    So just to ensure you understand...the input mask must force the first two letters to uppercase, but the rest after the hyphen must remain upper or lower case based on how the user typed the text.

    TX
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input mask question (Access 2003)

    No, that is not possible. You can force upper case or lower case, but you cannot return to "allow both cases" after that. You could use code in the After Update event of the control on the form used to enter the data to convert the first two characters of the value to upper case:

    Private Sub MyField_AfterUpdate()
    Me.MyField = UCase(Left(Me.MyField, 2)) & Mid(Me.MyField, 3)
    End Sub

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Input mask question (Access 2003)

    Thanks Hans. I suspected this, but just need confirmation. The code is a great suggestion. Many tx.

    PS: Its been a while since I posted, but great to be back and see that WOPR is as helpful as ever!
    Cheers
    Regards,
    Rudi

Posting Permissions

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