Hi,
I am trying to import a dbase IV file into table in Access using the TransferDatabase command.
I get this error:
Run-time error: 91
Object Variable or With Block Variable not set.
when I run this code:
Private Sub Next_Click()
Dim cnn As ADODB.Connection
cnn.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\V Care\Project\bhav1.mdb;Persist Security Info=False"
DoCmd.TransferDatabase acImport, "dBbase IV", "D:\V Care\Project\cmbhav.dbf", acTable, cmbhav, "D:\V Care\Project\bhav1.mdb", False, False
End Sub
Where: "D:\V Care\Project\cmbhav.dbf" is the dbf file
cmbhav is the dbf table to be imported
"D:\V Care\Project\bhav1.mdb" is the target DB
Hope you can help me with this!
Thanks,
I am trying to import a dbase IV file into table in Access using the TransferDatabase command.
I get this error:
Run-time error: 91
Object Variable or With Block Variable not set.
when I run this code:
Private Sub Next_Click()
Dim cnn As ADODB.Connection
cnn.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\V Care\Project\bhav1.mdb;Persist Security Info=False"
DoCmd.TransferDatabase acImport, "dBbase IV", "D:\V Care\Project\cmbhav.dbf", acTable, cmbhav, "D:\V Care\Project\bhav1.mdb", False, False
End Sub
Where: "D:\V Care\Project\cmbhav.dbf" is the dbf file
cmbhav is the dbf table to be imported
"D:\V Care\Project\bhav1.mdb" is the target DB
Hope you can help me with this!
Thanks,