我正在尝试将我的Excel工作簿连接到MS Access(ScreeningLogDatabase.accdb)中的表(ScreeningLogsTEST),我收到此错误:
运行时错误'3001':参数类型错误,超出可接受范围或彼此冲突
你能帮我弄明白为什么吗?
Sub ADOFromExcelToAccess()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; " & _
"Data Source=Q:\TOC Contract Screenings\ScreeningLogDatabase.accdb"
Set rs = New ADODB.Recordset
rs.Open “ScreeningLogsTEST”, ActiveConnection:=cn, CursorType:=adOpenDynamic, LockType:=adLockOptimistic