الأخوة الأعزاء
السلام عليكم ورحمة الله وبركاته
هذا كود الحذف :-
Private Sub ComDel_Click()
Dim reply As Integer
Dim reply1 As Integer
prompt$ = "هل أنت متأكد من حذف هذا السجل ؟ "
prompt1$ = "أسف..... لا يوجد سجل القاعده فارغه !"
reply = MsgBox(prompt$, vbMsgBoxRight + vbMsgBoxRtlReading + 1 + vbQuestion + vbDeFlx1ultButton1, "حذف السجل ")
If reply = 1 Then
With Data1.Recordset
If .BOF = True Then
reply1 = MsgBox(prompt1$, vbMsgBoxRight + vbMsgBoxRtlReading + vbOKOnly + vbCritical + vbDeFlx1ultButton1, "تحذير ")
Form1.Show
Else
.Delete
.MoveFirst
End If
End With
End If
End Sub
[code]
مع التحيه