//以下是代码,将X表中的一个字段里的23条数据读取到数组中,label在根据这23条数据分别赋值,下面的代码错在哪里,谢谢大家Dim str As String
Dim x(1 To 23) As String  Dim StrConnect As String '定义
   StrConnect = App.Path
    If Right(StrConnect, 1) <> "\" Then StrConnect = StrConnect + "\"
    StrConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & StrConnect & "\data\set.mdb"
    Adodc1.ConnectionString = StrConnect
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "SELECT * FROM [x]"
    Adodc1.Refresh
   
    For j = 1 To Adodc1.Recordset.RecordCount
x(j) = Adodc1.Recordset.Fields("项目名称")
Adodc1.Recordset.MoveNext
Next jFor i = 0 To Adodc1.Recordset.RecordCount - 1    Labx(i).Visible = True
   Textx(i).Visible = True
   Labx(i).Caption = x(j)
Next iDisp