精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • VB FOR 循環(huán)語句

    VB FOR 循環(huán)語句
    Dim i,j,c As Integer
    Dim a,b As String
    c = 0
    Adodc1.RecordSource = " select * from inf where 下單時間 between #" & DTP1.Value & "# and #" & DTP2.Value & "# "
    Adodc1.Refresh
    For j = 0 To Combo1.ListCount - 1
    b = Combo1.List(j)
    For i = 0 To Adodc1.Recordset.RecordCount - 1
    a = Adodc1.Recordset.Fields(15).Value
    If b = a Then
    c = 1 + c
    End If
    Next i
    Text8.Text = Combo1.List(j) + "共" + Str(c) + "記錄"
    Next j
    這里面有一個COMBOBOX控件里面有幾個省份的名稱(不重復),一個表中的字段(也就是Fields(15))也有省份名稱(有重復),現(xiàn)在想統(tǒng)計 這段時間內(nèi) 表中字段(Fields(15)中)幾個省份的名稱,結果顯示在Text8.text里!如:河南共8條記錄,內(nèi)蒙共3條記錄,河南共9條記錄……
    其他人氣:366 ℃時間:2020-03-25 16:03:38
    優(yōu)質(zhì)解答
    用count,否則的話,如果記錄太多,你將不停地MoveNext,不停地判斷b=a.Dim i As Integer,n As Long,s As StringText8 = ""Adodc1.RecordSource = " select 字段15的名稱,count(*) from inf where 下單時間 between #" &...
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版