29-02-16, 10:49 PM
اخي حقل التاريخ لا يقبل ان يكون خالي يجب اسناد قيمة له ولكن اذا ضروري يمكنك تعديل الكود هكذا
بالتوفيق
PHP كود :
Private Sub Command1_Click()
On Error Resume Next
Dim Response As String
Dim uname As String
uname = Text1.Text
Response = MsgBox("Update this record?", vbYesNo + vbQuestion, "Confirmation")
If Response = vbNo Then
Adodc1.Refresh
Adodc1.Recordset.CancelUpdate
Adodc1.Refresh
MsgBox "Save Cancelled!"
ElseIf Text1.Text = "" Then
MsgBox "Please fill the Employee ID !", vbCritical, Time
ElseIf Response = vbYes Then
Adodc1.Recordset.Fields("name") = IIf(IsNull(Text1.Text), "", Text1.Text)
Adodc1.Recordset.Fields("pass") = IIf(IsNull(Text2.Text), "", CDate(Text2.Text))
Adodc1.Recordset.Fields("eqama") = IIf(IsNull(Text4.Text), "", CDate(Text4.Text))
Adodc1.Recordset.Fields("startdate") = IIf(IsNull(Text4.Text), "", CDate(Text4.Text))
Adodc1.Recordset.Update
MsgBox "Record Saved!", vbInformation, Time
End If
End Sub
بالتوفيق
محاسب / أحمد عبد العليم
الى اللقاء ان شاء الله
الى اللقاء ان شاء الله

