25-01-17, 01:34 AM
وعليكم السلام ورحمة الله وبركاته
اضف الكود التالي
Text36.Text = "0"
Text38.Text = "0"
للاجراء كما بالصورة
انشاء الله تضبط
اضف الكود التالي
Text36.Text = "0"
Text38.Text = "0"
للاجراء كما بالصورة
انشاء الله تضبط
كود :
Private Sub DrawFlex()
Text36.Text = "0"
Text38.Text = "0"
With MSHFlexGrid1
.AllowUserResizing = flexResizeColumns
If RS.RecordCount > 0 Then
Set .DataSource = RS
EnabledOrDisbled_MainButtons True, False, True, True, True
EnabledOrDisbled_MovingButtons True, True, True, True
Else
Set .DataSource = Nothing
EnabledOrDisbled_MainButtons True, False, False, False, True
EnabledOrDisbled_MovingButtons False, False, False, False
.Clear
.Rows = 2
End If
Dim r As Integer
For r = 0 To 5
.TextMatrix(0, r) = RS.Fields(r).Name
Next
MSHFlexGrid1.ColWidth(0) = 500
MSHFlexGrid1.ColWidth(1) = 1500
MSHFlexGrid1.ColWidth(2) = 1500
MSHFlexGrid1.ColWidth(3) = 1500
MSHFlexGrid1.ColWidth(4) = 1500
MSHFlexGrid1.ColWidth(5) = 1500
For r = 0 To 5
MSHFlexGrid1.ColAlignment(r) = 3
MSHFlexGrid1.ColAlignmentFixed(r) = 3
Next
Text100.Text = RS.RecordCount
End With
With MSHFlexGrid1
For i = 1 To .Rows - 1
If MSHFlexGrid1.TextMatrix(i, 5) = ("ÐßÑ") Then
Text36.Text = Val(Text36.Text) + 1
End If
If MSHFlexGrid1.TextMatrix(i, 5) = ("ÃäËì") Then
Text38.Text = Val(Text38.Text) + 1
End If
Next
End With
End Sub

