Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Ctrl-A Select Long Text < KeyDown | Global Status Fn >
Back to Ctrl-A Select Long Text    Comments List
Upload Images   Link   Email  
Can we make this a Global Function
John Schreiber 
      
16 days ago
Could this be a Global Function so it could be used anywhere?  We would need it to work on any given Text Control?
Richard Rost 
            
16 days ago
I'm sure we could. I'll add it to the list. :)
Thomas Gonder 
      
14 days ago
I've used Private Sub Form_KeyDown() in all my forms to filter out a lot of keys that cause problems in my forms, like the ctrl+A, ctrl+S, ctrl +W, F5, F11.
I then tell users to use F2 to select all the text in any form entry control, including long text.

I put this in each form's class module:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  If fFrmProcKeyDown(KeyCode, Shift) = 0 Then KeyCode = 0
End Sub


And this code is in my forms helper module:

DetailsPublic Function fFrmProcKeyDown(ByVal aKeyCode As Integer, ByVal aShift As Integer) As Integer
'** Removes unwanted keyboard characters that mess up forms
'  Debug.Print "-----"
'  Debug.Print aKeyCode, aShift

  fFrmProcKeyDown = aKeyCode

  If aKeyCode = vbKeyShift Or aKeyCode = vbKeyControl Or aKeyCode = vbKeyMenu Or aKeyCode = vbKeyCapital Then
   Exit Function
  ElseIf aKeyCode = vbKeyF5 Or aKeyCode = vbKeyF11 Then
    fFrmProcKeyDown = 0
  ElseIf aKeyCode = vbKeyA Or aKeyCode = vbKeyS Or aKeyCode = vbKeyW Then
    If aShift = acCtrlMask Or aShift = acCtrlMask + acShiftMask Then fFrmProcKeyDown = 0
  End If
  
'  Debug.Print fFrmProcKeyDown
  'fFrmProcKeyDown = 0 'use if you want to test keystrokes without the action

End Function

Thomas Gonder 
      
14 days ago
At first, I was afraid that doing this for every keystroke might slow down the entry. But so far it keeps up with holding down a key for repeat. Heck, we've got powerful client computers now, let's use 'em! (The whole idea behind my ADS {and Richard's videos} and all its features.)

These are the problem keystrokes I've encountered so far.
If any developers know of others, I'd like to hear about it.
Jason Fleishman 
       
9 days ago
Thanks Thomas Gonder
Add a Reply Upload an Image

 
 
 

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: 1/23/2025 10:22:21 AM. PLT: 0s