Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim ItId As Long
On Error Resume Next
Select Case Button.Key
'It's Very Important!!!!!
'Button Name Are Case Sensitive...
Case "file"
MsgBox "not updated", 32, "info"
Case "Delete"
MsgBox "not updated", 32, "info"
Case "search"
MsgBox "not updated", 32, "info"
Case "print"
MsgBox "not updated", 32, "info"
Case "save"
cmdSave_Click
Case "add"
cmdAdd_Click
Case "refresh"
cmdRefresh_Click
Case "exit"
MsgBox "ãÚ ÇáÓáÇãÉ", 32, "Exit"
End
End Select
End Sub
Private Sub tvwAM_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Then
Dim x As Integer
x = MsgBox("Are you sure that you want to delete employee: (" & rs.Fields("name") & ") from the database?", _
vbQuestion + vbYesNo, "Delete a Contact!")
If x = vbYes Then
rs.Delete
MsgBox "Record has been deleted!", vbOKOnly + vbInformation, "Delete Successfull!"
rs.Requery
Call AddNodes
End If
End If
End Sub
Dim ItId As Long
On Error Resume Next
Select Case Button.Key
'It's Very Important!!!!!
'Button Name Are Case Sensitive...
Case "file"
MsgBox "not updated", 32, "info"
Case "Delete"
MsgBox "not updated", 32, "info"
Case "search"
MsgBox "not updated", 32, "info"
Case "print"
MsgBox "not updated", 32, "info"
Case "save"
cmdSave_Click
Case "add"
cmdAdd_Click
Case "refresh"
cmdRefresh_Click
Case "exit"
MsgBox "ãÚ ÇáÓáÇãÉ", 32, "Exit"
End
End Select
End Sub
Private Sub tvwAM_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Then
Dim x As Integer
x = MsgBox("Are you sure that you want to delete employee: (" & rs.Fields("name") & ") from the database?", _
vbQuestion + vbYesNo, "Delete a Contact!")
If x = vbYes Then
rs.Delete
MsgBox "Record has been deleted!", vbOKOnly + vbInformation, "Delete Successfull!"
rs.Requery
Call AddNodes
End If
End If
End Sub
