17-07-13, 05:15 AM
السلام عليكم
- جرب تستخدم هذه الطريقة ، أفضل وأسرع ، حيث أن التأخير في إظهار النتيجة هو اللوب Do الذي إستخدمته في كودك :
- تحياتي .
- جرب تستخدم هذه الطريقة ، أفضل وأسرع ، حيث أن التأخير في إظهار النتيجة هو اللوب Do الذي إستخدمته في كودك :
كود :
If RS.State = 1 Then RS.Close
Dim str3 As String
str3 = Text2.Text
RS.Open "select BarCod1 as BarCode,ItmDesA As Description,UntPri1 As UnitPrice from Items where ItmDesA like '" & str3 & "%'", rb, adOpenStatic, adLockOptimistic
IF RS.RecordCount > 0 Then
Set grid.DataSource = RS
Else
grid.Rows = 2
grid.Clear
grid.TextMatrix(1, 0) = "BarCode"
grid.TextMatrix(2, 0) = "Description"
grid.TextMatrix(3, 0) = "UnitPrice"
End IF- تحياتي .

