Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
 
Access Forum


Back to Access Forum
 

SendKeys Is Evil Upload Images   Link  
Nancy Troutman 
16 months ago
What is wrong with my code?   I need the scroll lock be pressed so that an Autohotkey script gives me quick access to Unicode characters.

Instead of turning on the Scroll Lock key, it toggles the Scroll Lock key.  So "SendKeys "{scrolllock}", True" will toggle the Scroll Lock off it is already on.

Private Sub Search4Root_Click()
  SendKeys "{scrolllock}", True
  Call ActivateKeyboardLayout(Heb, True)
  Me.FilterOn = False
  DoCmd.GoToRecord , "", acFirst
  DoCmd.RunCommand acCmdFind
  SendKeys "{scrolllock}", False
  On Error Resume Next
End Sub
Richard Rost
16 months ago
It's funny that you mention SendKeys. I just spent about 10 minutes in Access Developer 24 telling everyone how SendKeys is evil and you should never use it. I used it, too, when I first started using Access back in 1994. No. It's evil. Don't use it.
Nancy Troutman
16 months ago
Arggghhhhh!   I want the 3 days I spent trying to make it work back!
Richard Rost
16 months ago
If you REALLY need that to work, I'm sure there's a way to check the state of the scroll lock key. I've written code before to toggle CAPS LOCK on and off. Gimme a bit...
Nancy Troutman
16 months ago
Actually, I can switch the key that triggers the Autohotkey script from Scroll Lock to CapLocks.   The MS Hebrew keyboard does not give me vowels.   I put all the vowels into the AutoHotkey script - using Unicode.
Richard Rost
16 months ago
Which key it is doesn't matter. Putting something together for you now. Stay tuned.
Richard Rost
16 months ago
Here you go: Turn Caps Lock On Off
Nancy Troutman
16 months ago
I just discovered another reason to split the database.   I was putting Sendkey on every field to force the field into the correct language.   I was able to abandon the front-end and restore a back-up I made just before I started the SendKey nonsense without losing all the data-entry I had done.

Thanks so much for the solution!
Richard Rost
16 months ago
My pleasure

This thread is now closed. If you wish to comment, start a NEW discussion, below.
 


Back to Access Forum Comments
 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

You may want to read these articles from the 599CD News:

5/27/2022Add Anything
5/26/2022List Items Edit Form
5/25/2022Column Colors
5/24/2022Multi-Table Forms
5/23/2022Variables
5/21/2022Access Developer 39
5/21/2022Access Developer 39 Lessons
5/21/2022Access Developer 39
5/21/2022Select Items in Related Table
5/21/2022Clear List Box
 

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
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
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn