who can help me

goni07

New member
Local time
Today, 12:24
Joined
Jan 22, 2008
Messages
9
I have make sam buttons i need this butons to work with key ex with F12
just I need Code
 
It will probably depend on if you want the F12 to work with Access or with an external program. You might need to explain more about what you are trying to do.
Search for the "Sendkeys" here are the key codes.
Code:
Alt-D = %D

Ctrl-C = ^C

Pasted from Access Help:
BACKSPACE = {BACKSPACE}, {BS}, or {BKSP}
BREAK = {BREAK}
CAPS LOCK = {CAPSLOCK}
DEL or DELETE = {DELETE} or {DEL}
DOWN ARROW = {DOWN}
END = {END}
ENTER = {ENTER}or ~
ESC = {ESC}
HELP = {HELP}
HOME = {HOME}
INS or INSERT = {INSERT} or {INS}
LEFT ARROW = {LEFT}
NUM LOCK = {NUMLOCK}
PAGE DOWN = {PGDN}
PAGE UP = {PGUP}
PRINT SCREEN = {PRTSC}
RIGHT ARROW = {RIGHT}
SCROLL LOCK = {SCROLLLOCK}
TAB = {TAB}
UP ARROW = {UP}
F1 = {F1}
F2 = {F2}
F3 = {F3}
F4 = {F4}
F5 = {F5}
F6 = {F6}
F7 = {F7}
F8 = {F8}
F9 = {F9}
F1 =
F10 = {F10}
F11 = {F11}
F12 = {F12}
F13 = {F13}
F14 = {F14}
F15 = {F15}
F16 = {F16}

To specify keys combined with any combination of the
SHIFT, CTRL, and ALT keys, precede the key code with one
or more of the following codes:

SHIFT = +
CTRL = ^
ALT = %

To specify that any combination of SHIFT, CTRL, and ALT
should be held down while several other keys are pressed,
enclose the code for those keys in parentheses. For
example, to specify to hold down SHIFT while E and C are
pressed, use "+(EC)". To specify to hold down SHIFT while
E is pressed, followed by C without SHIFT, use "+EC".
 
I dont understant
I have make buttons to print report this button work but i need if i will to print report I pres f12 to print how can I make this procedur?
thank you
 
So you want to activate a control by pressing F12? I am usure how to do this. However, if you want to activate the command by pressing say Ctrl+d then do this:

Firstly set the form's Key Preview property to "Yes"

Next add this code to the form's On Key Press Event

Code:
    Dim strCharacter As String

    ' Convert ANSI value to character string.
    strCharacter = Chr(KeyAscii)
    ' Convert character to upper case, then to ANSI value.
    KeyAscii = Asc(UCase(strCharacter))
    
    If KeyAscii = "4" Then
        'the user has pressed Ctrl+d
        Call btn_New_Click 'you need to change this to your buttons on click Sub name
    End If
 

Users who are viewing this thread

Back
Top Bottom