wordpress statistics
  • Today is Wednesday, May 23, 2012

3 Responses to “Input Masks and Data Entry”

  1. WP Themes says:

    Good post and this post helped me alot in my college assignement. Say thank you you as your information.

  2. Flo Brown says:

    I need to know what vaule to enter for a name like McDonald. An autocap with the additional option to use Caps if needed but otherwise text remains in lowercase. Is this possible?

  3. a.p.r.pillai says:

    Input Masks cannot be conditional but with manual intervention (like button clicks or checkbox clicks etc.) it is possible with VBA.

    For McDonald like names set the Input Mask to ">L<L>L<????????????"

    For first letter cap and remaining characters in lower case: ">C<??????????????"
    For all upper case letters you can remove the < symbol.

    If the above Input Masks strings are required on the same textbox at your will then create two Command Buttons (cmd1 and cmd2) and add two Click Event procedures as given below:

    Private Sub cmd1_Click()
    Me.txtDisplay.InputMask = ">L<L>L<????????????"
    End Sub

    Private Sub cmd2_Click()
    Me.txtDisplay.InputMask = ">C<??????????????"
    End Sub

    The Input Mask string will be set to the txtDisplay Text Box depending on which command button you clicked before entering values into it. Even after entering value if you click the command button you can see the text changes.

Leave a Reply

You must be logged in to post a comment.