求助vb编程
Dim rs2 As New ADODB.RecordsetSet rs2.ActiveConnection = cnn
rs2.CursorType = adOpenStatic
sqlstring2 = "select * FROM 到达时刻 where '廊坊站'"
rs2.Open sqlstring2
Dim dd(1 To 14) As Date '建立存放到达时刻的数组
For i = 1 To 14
dd(i) = rs2.Fields("廊坊站")
rs2.MoveNext
Next '廊坊站的到达时刻存入数组
For m = 1 To 13
For n = m + 1 To 14
If dd(m) > dd(n) Then
t = dd(m)
dd(m) = dd(n)
dd(n) = t
End If
Next
Next '将到达时刻排序
Dim rs3 As New ADODB.Recordset
Set rs3.ActiveConnection = cnn
rs3.CursorType = adOpenStatic
rs3.Open "select 车次 from 到达时刻 where 廊坊站 = dd(1)" '有问题 说是dd无函数定义
checi = rs3("车次").Value
这是我写的代码 但是执行时总是说dd函数无定义 我明明定义dd是一个数组并且赋值了啊??我只是想查询对应时刻的车次 求助各位大神????