08-06-13, 01:43 PM
الخطأ عند محاولة ادخال حساب مزود جديد
الخطأ الأول في البحث
Private Sub cmdOK_Click()
If supplierflag = 1 Then
frmMMSSupplier.txt(3) = lv.ListItems(lv.SelectedItem.Index).SubItems(1)
'frmMMSSupplier.txt(3).SetFocus
Unload Me
End If
End Sub
الخطأ الثاني في ادخال المعلومات
Private Sub cmdsave_Click()
Select Case cmdSave.Caption
Case "Ruaje"
Call dbconek
With ar
.Open "Select *From tblFurnizuesit", strConek, adOpenStatic, adLockOptimistic
.AddNew
!fur_id = txt(0)
!furnizuesi = txt(1)
!adresa = txt(2)
!personi = txt(3)
!numri = txt(4)
.Update
MsgBox "Furnizuesi u ruajt me sukses.", vbInformation, "Ruajtja!"
Call Command2_Click
.Close
End With
Case "Fresko"
Call dbconek
With ar
criteria = "Select *From tblFurnizuesit Where fur_id='" & txt(0) & "'"
.Open criteria, strConek, adOpenStatic, adLockOptimistic
!fur_id = txt(0)
!furnizuesi = txt(1)
!adresa = txt(2)
!personi = txt(3)
!numri = txt(4)
.Update
MsgBox "Furnizuesi u ruajt me sukses.", vbInformation, "Ruajtja!"
Call Command2_Click
.Close
End With
End Select
End Sub
الخطأ الأول في البحث
Private Sub cmdOK_Click()
If supplierflag = 1 Then
frmMMSSupplier.txt(3) = lv.ListItems(lv.SelectedItem.Index).SubItems(1)
'frmMMSSupplier.txt(3).SetFocus
Unload Me
End If
End Sub
الخطأ الثاني في ادخال المعلومات
Private Sub cmdsave_Click()
Select Case cmdSave.Caption
Case "Ruaje"
Call dbconek
With ar
.Open "Select *From tblFurnizuesit", strConek, adOpenStatic, adLockOptimistic
.AddNew
!fur_id = txt(0)
!furnizuesi = txt(1)
!adresa = txt(2)
!personi = txt(3)
!numri = txt(4)
.Update
MsgBox "Furnizuesi u ruajt me sukses.", vbInformation, "Ruajtja!"
Call Command2_Click
.Close
End With
Case "Fresko"
Call dbconek
With ar
criteria = "Select *From tblFurnizuesit Where fur_id='" & txt(0) & "'"
.Open criteria, strConek, adOpenStatic, adLockOptimistic
!fur_id = txt(0)
!furnizuesi = txt(1)
!adresa = txt(2)
!personi = txt(3)
!numri = txt(4)
.Update
MsgBox "Furnizuesi u ruajt me sukses.", vbInformation, "Ruajtja!"
Call Command2_Click
.Close
End With
End Select
End Sub