SendKeys fails in Windows 7

P

Paul Brady

The following command failed when used in Access 2003 running on
Windows 7:

SendKeys "{f4}" ' causes drop-down names list on hitting first key

It causes the debug window to open, which the user cannot deal with..
This command has worked for 12 years in Access 95, 97, 2K, and 2003,
running on Windows 95, W98, W2000, WMe, WXP, and Vista. But on a
laptop running W7, it failed. Any idea why? And, BTW, actually
pressing the F4 key does work properly.
Pete Brady
 
P

Peter Jason

The following command failed when used in Access 2003 running on
Windows 7:

SendKeys "{f4}" ' causes drop-down names list on hitting first key

It causes the debug window to open, which the user cannot deal with..
This command has worked for 12 years in Access 95, 97, 2K, and 2003,
running on Windows 95, W98, W2000, WMe, WXP, and Vista. But on a
laptop running W7, it failed. Any idea why? And, BTW, actually
pressing the F4 key does work properly.
Pete Brady

I have Access2010 and I find the F4 key refuses to drop-down a combo
box when this is located in a subform. No one can help me!
 
C

Char Jackson

The following command failed when used in Access 2003 running on
Windows 7:

SendKeys "{f4}" ' causes drop-down names list on hitting first key

It causes the debug window to open, which the user cannot deal with..
This command has worked for 12 years in Access 95, 97, 2K, and 2003,
running on Windows 95, W98, W2000, WMe, WXP, and Vista. But on a
laptop running W7, it failed. Any idea why? And, BTW, actually
pressing the F4 key does work properly.
Some folks say what you're running into is a UAC limitation. You can
test that theory by temporarily dropping UAC down and getting it out
of the way. You may or may not want to just leave it that way.
Alternatively, consider replacing the SendKeys command with something
else that is functionally equivalent without the security issue.
Unfortunately, I don't know what that would be.
 
D

DanS

The following command failed when used in Access 2003
running on Windows 7:

SendKeys "{f4}" ' causes drop-down names list on
hitting first key

It causes the debug window to open, which the user cannot
deal with.. This command has worked for 12 years in Access
95, 97, 2K, and 2003, running on Windows 95, W98, W2000,
WMe, WXP, and Vista. But on a laptop running W7, it
failed. Any idea why? And, BTW, actually pressing the F4
key does work properly.
Pete Brady
SendKeys hasn't worked properly since Vista. (In VB6 anyway.)

Maybe you can adapt this VB6 work-around to VBA....

http://vb.mvps.org/samples/SendInput/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top