Computer Learning Zone CLZ Access Excel Word Windows

If you fail once... the dream is still there. A dream is only over if you give it up, or if it comes true.

-Neil Peart
 
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
Upload Images   Link   Email  
Set Close Button Question
Ramona Woitas 
      
3 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 
          
3 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 
          
3 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 
          
3 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 OP 
      
3 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 
          
3 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.
 

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

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/15/2025 2:13:17 AM. PLT: 1s