[RESOLVED] Using Enter to use a button
Hey, Im making a basic accounting program at the moment, and I was wondering how I would go about this.
The user needs to fill in multiple textboxes, then I want them to be able to press Enter to use the command button that submits it all, rather than clicking on the button with a mouse or tabbing and pressing enter.
I know I need to use ascii or something, and the ascii code for enter is 13, but I dont know the code to get all this to work, and where to put the code, if anyone could help, it would be much appreciated, thanks ;)
Re: Using Enter to use a button
Just set the Default property of the command button to True.
Re: Using Enter to use a button
Quote:
Originally Posted by
MartinLiss
Just set the Default property of the command button to True.
Oh wow, I cant believe it was that simple, thanks a million mate. *Reputation*
Re: Using Enter to use a button
You're welcome. Also please help us now by marking the thread as resolved. If you have JavaScript enabled you can do that easily by pulling down the Thread Tools menu and selecting the Mark Thread Resolved item.