combination of Keys like CTRL + W

  • Thread starter Thread starter a
  • Start date Start date
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
 
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
 
SendKeys can do this too. Read the help file.
fSendKeys relies on SendKeys, so the same help file page applies.

-Tom.
Microsoft Access MVP
 
Back
Top