20-04-13, 12:52 PM
السلام عليكم
- في البداية تأكد من أن نوعالحقل nameitem نصي , ثم جرب هذا التعديل :
- تحياتي .
- في البداية تأكد من أن نوعالحقل nameitem نصي , ثم جرب هذا التعديل :
كود :
Private Sub Combo2_Click()
If RS.State = 1 Then RS.Close
SQL = "select * from item where nameitem ='" & Trim$(Combo2.Text) & "'"
RS.Open SQL, DB, adOpenDynamic, adLockOptimistic
If RS.RecordCount > 0 Then
If Not IsNull(RS!prins) Then Text2.Text = RS!prins Else Text2.Text = "0"
If Not IsNull(RS!num) Then Text5.Text = RS!num Else Text5.Text = "0"
Else
Text2.Text = "0"
Text5.Text = "0"
End If
If RS.State = 1 Then RS.Close
End Sub- تحياتي .

