18-04-21, 03:11 AM
انا عندي هذا الكود الذي يجمع الاعمدة في قاعدة البيانات
و انا اريد جمع مجاميع الصفوف المتشابه
و الكود:If RA.State = 1 Then RA.Close
Sql = "Select SUM(total) as Total from recettes where Num>= 1 and Num<=500"
RA.Open Sql, db, adOpenKeyset, adLockOptimistic
If RA.RecordCount > 0 Then
If Not IsNull(RA![total]) Then Text2.Text = RA![total] Else Text2.Text = ""
Else
Text2.Text = "0"
End If
و انا اريد جمع مجاميع الصفوف المتشابه
و الكود:If RA.State = 1 Then RA.Close
Sql = "Select SUM(total) as Total from recettes where Num>= 1 and Num<=500"
RA.Open Sql, db, adOpenKeyset, adLockOptimistic
If RA.RecordCount > 0 Then
If Not IsNull(RA![total]) Then Text2.Text = RA![total] Else Text2.Text = ""
Else
Text2.Text = "0"
End If
