I get that error when I try to link my table to a SQL server, I also get an error if I try to click the button when no table is open.
I just want to create a form for simple data entry into a SQL table. Haven’t been able to find any simple gudies for this task, so any guides you can give would be much appreciated.
Here is an example copied directly from Access’ Help topic for the TransferDatabase method. It assumes a DSN (data source name) called “DataSource1” is available and points to desired external database.
Unfortunately I’m not exactly sure what you’re attempting to do. If your goal is to export an existing Access table to an ODBC database, you would use acExport as the transfer type with the TransferDatabase method.
Actually, if this is a one-time operation where you want to import/export/link between Access and an ODBC database, seems like it would be easier and faster to use the import/export options from the ribbon. No programming required.