I have a routine that imports ODBC data using:
DoCmd.TransferDatabase acImport, "ODBC Database", !ConnectString, acTable, !SourceTable, !LocalTableName, False
The problem is sometimes I need to manually select File>Get External Data>Import, select ODBC from "Files of Type", select the Data Source, then hit "cancel" when the "Import Object" box pops up, THEN I can run the routine. I have to do this for each database I'm importing from or I'll get an ODBC error. It's like I have to go through all the motions manually without actually importing anything before my routine will do it.
Any ideas of what's happening?
Patrick
DoCmd.TransferDatabase acImport, "ODBC Database", !ConnectString, acTable, !SourceTable, !LocalTableName, False
The problem is sometimes I need to manually select File>Get External Data>Import, select ODBC from "Files of Type", select the Data Source, then hit "cancel" when the "Import Object" box pops up, THEN I can run the routine. I have to do this for each database I'm importing from or I'll get an ODBC error. It's like I have to go through all the motions manually without actually importing anything before my routine will do it.
Any ideas of what's happening?
Patrick