G
Guest
Hi, I have the below code, and I am learning how to store stuff from excel to
Access. I build a program that stored all the info in another Excel
workbook, however it has gotten to big now, and I need something bigger...but
when I run this command, it gives me the below error...anyone got any ideas
how to fix this...
Error:
Run-time error '-2147024770 (8007007e)':
Automation error
The specified module could not be found.
When I click debug, it highlights New ADODB.Connection as being the
error...any ideas??
Example:
Sub ADOFromExcelToAccess()
Dim cn As ADODB.Connection, rs As ADODB.Recordset, r As Long
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Documents and Settings\Administrator\Desktop\Master_Logs.mdb;"
Set rs = New ADODB.Recordset
rs.Open "User", cn, adOpenKeyset, adLockOptimistic, adCmdTable
r = 3
Do While Len(Range("A" & r).Formula) > 0
With rs
..AddNew
..Fields("PIP_ID") = BITE.textbox1.Value
..Fields("F_NAME") = BITE.textbox2.Value
..Fields("L_NAME") = BITE.textbox3.Value
..Fields("Initials") = BITE.textbox4.Value
..Update
End With
r = r + 1
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Access. I build a program that stored all the info in another Excel
workbook, however it has gotten to big now, and I need something bigger...but
when I run this command, it gives me the below error...anyone got any ideas
how to fix this...
Error:
Run-time error '-2147024770 (8007007e)':
Automation error
The specified module could not be found.
When I click debug, it highlights New ADODB.Connection as being the
error...any ideas??
Example:
Sub ADOFromExcelToAccess()
Dim cn As ADODB.Connection, rs As ADODB.Recordset, r As Long
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Documents and Settings\Administrator\Desktop\Master_Logs.mdb;"
Set rs = New ADODB.Recordset
rs.Open "User", cn, adOpenKeyset, adLockOptimistic, adCmdTable
r = 3
Do While Len(Range("A" & r).Formula) > 0
With rs
..AddNew
..Fields("PIP_ID") = BITE.textbox1.Value
..Fields("F_NAME") = BITE.textbox2.Value
..Fields("L_NAME") = BITE.textbox3.Value
..Fields("Initials") = BITE.textbox4.Value
..Update
End With
r = r + 1
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub