I have a number of Linked (ODBC) tables in my MSAccess DB.
I what I want to do is create a copy of each table (preferably the Structure Only).
ive tried,
DoCmd.CopyObject , "NewTableName", acTable, "SourceTableName"
DoCmd.TransferDatabase acImport, "Microsoft Access", _
SrcDatabase, acTable, SrcTable, DstTable, StructureOnly
but 开发者_高级运维these just seem to make a copy of the linked table.
think ive got it sorted, but ill leave it open incase someone has a better solution,
DoCmd.RunSQL ("Drop Table [LocalTable]")
DoCmd.RunSQL ("SELECT * INTO [LocalTable] FROM [ODBCTable];")
Had the same problem. Found out that the "DoCmd.Transferdatabase" worked, but had to use "1" instead of the keyword "True". And if the source table is a linked table the destination table appears as linked as well (with the arrow in the table list), although it really is in the local database.
精彩评论