求助,有关参数传递
我想把一个recordset 变量作为参数传递给模块,但提示类型不匹配,是什么原因,请指点。
下面是模块代码
Public Sub Showdata(rst as recordset)
Dim i As Integer
On Error Resume Next
rsthy.MoveFirst
With msf1
.Rows = 50 'rsthy.RecordCount
.Row = 1
rsthy.MoveFirst
Do While Not rsthy.EOF
.Rows = .Rows + 1
For i = 1 To rsthy.Fields.Count
.TextMatrix(.Row, i) = rsthy.Fields(i - 1)
Next i
.Row = .Row + 1
rsthy.MoveNext
Loop
End With
End Sub