maskEdBox auto tab behaves incorrectly

Posted on 2011-10-04
Last Modified: 2012-05-12
I have a control array made of a maskEdBox. The auto tab behaves as expected for lower case letters in a single value entry field, but as soon as you hold the shift key the tab goes backwards. Is this a Microsoft Bug?
Question by:Brandon_Campbell
    LVL 69

    Expert Comment

    by:Éric Moreau
    goes backward to the previous field? this is the normal behavior. check

    Author Comment

    The masked control has a mask of >A. If the user were to hold the shift key and select "N" while the shift key is depressed then its normal for the autotab to go backwards? If this is the case then I will have to code the caps lock and unlock depending on the field.
    LVL 69

    Accepted Solution

    >>If the user were to hold the shift key and select "N" while the shift key is depressed then its normal for the autotab to go backwards?

    yes because a "SendKeys TAB" is sent by the MaskTextBox and the SHIFT is pressed so a backtab is interpreted

    Author Closing Comment

    This is a bad behavior for the control. My customer has a entry field that requires a "+" key to be entered in certain situations. Of course this send ths control back if they use the shift+"+" key. I have included in the lost focus event a setfocus to the next control in this situation but this is not the best work around. I could instruct the users to only use the numberpad "+" which works correctly. I will also key the comments and text fields to turn off caps lock on got focuse and return on lost focus.

    Thank you.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now