Property to link a cmdbutton to a enter key?

Posted on 2006-04-28
Last Modified: 2008-03-10
Its been a while since I wrote a VB app and my memory has faded but I seem to recall a property that would allow you to link the enter key for a control to a cmd button...
For instance, I'm typing in a texbox and as soon as I hit the enter key the submit command button is automatically clicked. I know I can do this by monitoring the ascii vals of the key events but I would rather do this via properties (if possible).
Question by:mccainz2
    1 Comment
    LVL 69

    Accepted Solution

    Hi mccainz2,

    You have to set the Default property of one button.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    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

    20 Experts available now in Live!

    Get 1:1 Help Now