Solved

Numlock key & Access macros

Posted on 2000-04-13
9
482 Views
Last Modified: 2012-05-05
I have a macro tied to a field that sends few keystrokes to the form using the sendkeys Access command.

But as soon as the macro fires, it turns off my numlock key. Even sending a numlock at the end of the macro doesn't turn it back on. Help !

Is there a command or some VB code I can use to turn it back on ?
0
Comment
Question by:munna
  • 3
  • 2
  • 2
  • +1
9 Comments
 

Author Comment

by:munna
ID: 2712895
NC
0
 
LVL 9

Expert Comment

by:BrianWren
ID: 2712965
This is a known bug with Access, which is documented at MS's web site.

To work around this, find another way to accomplish your goal.  (This can almost always be done.)

Can I help?

Brian
0
 

Expert Comment

by:GOLLEM
ID: 2712980
munna->

What exactly are you sending? Maybe you're using the wrong combination of letters. This is a really weird problem......

Have you checked yet if the same problem occurs on a different machine? The problem could also be in your access installation.

I'm listening in anyway, this is interresting :)

Regards,

         Michiel

0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 9

Expert Comment

by:BrianWren
ID: 2713074
Michiel, it is a known bug....
0
 
LVL 9

Expert Comment

by:BrianWren
ID: 2713107
The more I think on it, the more I seem to remember that using DoEvents after SendKeys is supposed to help...  (This might help only in VBA.  You might need to put your SendKeys into a function that you call instead, which has DoEvents after each Sendkeys instruction.

Brian
0
 
LVL 7

Expert Comment

by:Believer
ID: 2713301
[In the tone of voice of Beavis & Butthead...]  "Sendkeys suck, heh. heh. heh..." "Yeah, heh, so do macros, heh.  heh."  
Sorry, I'm feeling a bit... opinionated!!!
0
 

Author Comment

by:munna
ID: 2713762
I am basically sending few TABs to jump to a subform and then CTRL+SHIFT+TAB to jump back to the mainform. I am doing this so that the user will not exit the data entry screen without creating atleast one record on the subform. If you can tell me what command I can use to do that with code, it will be great.
I am not at all an experienced programmer (as you can tell).



0
 
LVL 7

Accepted Solution

by:
Believer earned 100 total points
ID: 2713820
You could pursue the Macro command GoToControl.  If you write code beind the form instead of a macro, look into the .SetFocus property of controls instead.
0
 

Expert Comment

by:GOLLEM
ID: 2713998
Brian->

Hadn't noticed that bug yet :)

0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question