Kod:
Private Sub ara_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 43 Then '+ tuşu
If (Me.lst_ara.ListCount = 2) Then
Me.lst_ara.Width = 0
Me.lst_ara.Height = 0
kayitDegistir CInt(Me.lst_ara.ItemData(1))
Me.btn_ek2.SetFocus
lst_ara.Visible = False
Else
Call closingMsgBox("Listede birden fazla kayıt var", "Kayıda Gidilemeyecek", 1)
End If
ElseIf KeyAscii = 45 Then '- tuşu
If (Me.lst_ara.ListCount >= 2) Then
Me.lst_ara.Width = 0
Me.lst_ara.Height = 0
kayitDegistir CInt(Me.lst_ara.ItemData(Me.lst_ara.ListCount - 1))
Me.btn_ek2.SetFocus
lst_ara.Visible = False
Else
Call closingMsgBox("Listede birden fazla kayıt var", "Kayıda Gidilemeyecek", 1)
End If
Else
'MsgBox KeyAscii
End If
End Sub