想把一个ADO记录集作为报表的数据源,用以下方法尝试失败。
请指点迷津
Private Sub Report_Open(Cancel As Integer)
Dim rst As New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.Open "SELECT 表1.* FROM 表1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Me.Recordset = rst
End Sub