Fonksiyon tuşları F1, F2, F3...

Katılım
10 Temmuz 2007
Mesajlar
273
Excel Vers. ve Dili
2002 türkçe
Arkadaşlar;
Formlar üzerindeki düğmelere fonksiyon tuşlarını atamak istiyorum.
Örneğin Form1 üzerindeki "Form2yi Aç" düğmesine kalvyeden F2'yi tıkladığmda bu düğmeye yıklamış olayım. Böyle birşey access'te mümkün müdür? Lütfen yardımcı olur musunuz?
 
Katılım
21 Ekim 2005
Mesajlar
529
Excel Vers. ve Dili
2010 - TR!
Private Sub Form_Load()
Me.KeyPreview = True
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF2
' Process F2 key events.
Case vbKeyF3
' Process F3 key events.
Case vbKeyF4
DoCmd.OpenForm "Form1"
Case Else
End Select
End Sub

yukardakı ornege gore deneyın
ıyı gunler.
 
Katılım
10 Temmuz 2007
Mesajlar
273
Excel Vers. ve Dili
2002 türkçe
Sn cyberwolf1980;
Yazdığın kodlar için çok sağol. Ama fonksiyon tuşunu bir olaya atadığım zaman, aynı zamanda access'in kendi işlevini de uyguluyor.
örn: F9 normalde "yenile" işlevidir. Bu tuşa kendi işlevimi (Form Aç) yüklediğim zaman aynı anda hem yeniliyor hemde form açıyor.
Bunu değiştirmek mümkün mü?
 
Katılım
30 Temmuz 2007
Mesajlar
74
Excel Vers. ve Dili
eee
ayhan arkadaşımızın gönderdiği kodlarda değişiklik yapabilirsin
ör..
Me.KeyPreview = True
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF2
' Process F2 key events.
Case vbKeyF3
' Process F3 key events.
Case vbKeyp
DoCmd.OpenForm "Form1"
Case Else
End Select
End Sub

f4 yerine access işeyaramayan p tuşunu kullan

iyi çalışmalar
 
Katılım
10 Temmuz 2007
Mesajlar
273
Excel Vers. ve Dili
2002 türkçe
Sn emre_bademci;

Zaten bir denetimin etiketine-resim yazısına örn: üzerinde "Aç" yazan düğmeye "Aç" yerine "&Aç" yazıldığında "A" harfi altı çizili olur (Aç) ve klavyede (Alt+A) tıklandığında o düğme tıklanmış olur.
Benim istediğim örneğin F7 tuşu yazım denetimi yapar, bana öyle bir kod yazın ki F7 tıkladığımda -sadece- Form1'i açsın.
İlgilendiğiniz için çok teşekkür ederim. İyi çalışmalar ...
 
Katılım
15 Kasım 2006
Mesajlar
583
Excel Vers. ve Dili
Ms Office 2003 Türkçe
yukarıdaki kod da end select ten sonra keycode=0
yapınca olması lazım diye hatırlıyorum. denemedim. sen denersin.
 
Katılım
25 Mayıs 2007
Mesajlar
165
Excel Vers. ve Dili
türkçe vista işletim sistemi
excel2007
türkçe
[ SendKey ] metodu uygulayabilirisn sanırım.

Açıklama aşağıda ancak Türkçesini bulamadım.

işine yarayacağını umarım...





SendKeys Method Example

This example uses the SendKeys method to quit Microsoft Excel.

Application.SendKeys("%fx")

Sends keystrokes to the active application.

Syntax

expression.SendKeys(Keys, Wait)

expression Optional. An expression that returns an Application object.

Keys Required Variant. The key or key combination you want to send to the application, as text.

Wait Optional Variant. True to have Microsoft Excel wait for the keys to be processed before returning control to the macro. False (or omitted) to continue running the macro without waiting for the keys to be processed.

Remarks

This method places keystrokes in a key buffer. In some cases, you must call this method before you call the method that will use the keystrokes. For example, to send a password to a dialog box, you must call the SendKeys method before you display the dialog box.

The Keys argument can specify any single key or any key combined with ALT, CTRL, or SHIFT (or any combination of those keys). Each key is represented by one or more characters, such as "a" for the character a, or "{ENTER}" for the ENTER key.

To specify characters that aren't displayed when you press the corresponding key (for example, ENTER or TAB), use the codes listed in the following table. Each code in the table represents one key on the keyboard.

Key Code
BACKSPACE {BACKSPACE} or {BS}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
CLEAR {CLEAR}
DELETE or DEL {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER (numeric keypad) {ENTER}
ENTER ~ (tilde)
ESC {ESCAPE} or {ESC}
HELP {HELP}
HOME {HOME}
INS {INSERT}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
RETURN {RETURN}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1 through F15 {F1} through {F15}


You can also specify keys combined with SHIFT and/or CTRL and/or ALT. To specify a key combined with another key or keys, use the following table.

To combine a key with Precede the key code with
SHIFT + (plus sign)
CTRL ^ (caret)
ALT % (percent sign)
 
Katılım
10 Temmuz 2007
Mesajlar
273
Excel Vers. ve Dili
2002 türkçe
Sn cyberwolf1980, emre bademci, yeni54 ve geren36;
İlgilendiğiniz için çok sağolun.
 
Üst