Computer Learning Zone CLZ Access Excel Word Windows

I think you learn more if you're laughing at the same time.

-Mary Ann Shaffer & Annie Barrows
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Courses > Access > Templates > ABCD > Part 2 < Part 1 | Part 3 >
Back to ABCD Core Part 2    Comments List
Set Close Button Question Upload Images   Link   Email  
Ramona Woitas        
2 years ago
Part 2 Lesson 2 at 32:13
Is it possible to add code to the Button

- A User Double Clicks on Helper Field + HelperF Opens
- HelperF is already set to go to New Record

? Is it possible to add code, so if User presses the ESC (Escape Key) on the keyboard, it essentially does the same thing as the Set & Close Button?

- Closes HelperF + Sets Helper Combo Field on EntityF to Blank?
Scott Axton            
2 years ago
Yes this can be done.  Unfortunately there isn't a super good place to point you for more info.
Searches don't come up with much.    

(Richard - FastTip  material?)

This was covered briefly in the Search Seminar in Lesson 18 and again in Developer 16 Lesson 5.

If you go into the properties for a Button on a form under the Other tab you will see two options Default and Cancel.
Default tells Access that that is the button to "press" when you type enter on the form.  Cancel tells Access the button to "press" when you hit ESCape on the form.  Those options are either yes or no - and the same button can't be both Default and Cancel - One option per button.

What ever actions you have programed for that button will be performed just as though you clicked it with a mouse.

Scott Axton            
2 years ago
Another cool trick that is relatively undocumented is you can place an & before a letter and turn that in to a key combination to "press" the button"
For example the caption for that button is "Set & Close" in the Core 2 video you mentioned.  If you type in the caption properties "&Set & Close" when you go back to form view it will look like this:  Set & Close.

Now in the form if you Press the key combination "Alt-S" that will act as though you pressed the button with the mouse as well.
Scott Axton            
2 years ago
I should mention that that can be kind of dangerous.  If users are used to typing enter to move to the next field they would press the xxx button instead.
Pressing ESC could have the same unintended consequences.  Instead of undoing your typing ESC would press your yyy button and possibly introduce unintended results in your program flow.
Ramona Woitas        
2 years ago
Thanks for the information Scott.  I think I will leave well enough alone, so it doesn't screw up something later.  Or at the very least, wait till Part 6 is completed, and then maybe revisit.
Richard Rost            
2 years ago
Yeah, I would just assign a Cancel button if that's what you want to do. Is [THING] possible in Access? Probably. Should you do [THING] even though you can? That's the question. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in ABCD Core Part 2.


The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/14/2024 8:00:06 AM. PLT: 1s