combination of Keys like CTRL + W

A

a

Hi All
http://www.mvps.org/access/api/api0046.htm
this is a function FSendKeys in the above URL From MVP
how can i send (tab) (Enter) (CTRL) (ALT) or combination of Keys like CTRL +
A any think
using this function
How can I call this function from command button
in access 2003
exmple
command1_click
call fSendKeys ((((i want here CTLR + W))))
' comments here:
'the code to close the current form
end sub
how can i do that
 
D

Dirk Goldgar

a said:
Hi All
http://www.mvps.org/access/api/api0046.htm
this is a function FSendKeys in the above URL From MVP
how can i send (tab) (Enter) (CTRL) (ALT) or combination of Keys like CTRL
+ A any think
using this function
How can I call this function from command button
in access 2003
exmple
command1_click
call fSendKeys ((((i want here CTLR + W))))
' comments here:
'the code to close the current form
end sub
how can i do that


I believe it's the same as the VBA SendKeys statement, so you should be able
to find the information you want in the help topic for SendKeys. You would
send Ctrl+W like this:

fSendKeys "^W"

However, there is seldom any need to send keystrokes in Access, and I
certainly would not use it to close a form -- not when I can use

DoCmd.Close acForm, Screen.ActiveForm.Name
 
T

Tom van Stiphout

SendKeys can do this too. Read the help file.
fSendKeys relies on SendKeys, so the same help file page applies.

-Tom.
Microsoft Access MVP
 

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