The transferdatabase I coded was attempting to link the table "tblNewTableIV" just created in dbs to the frontend dbsfe retaining the same name. My first time using the method so my newly acquired understanding of the method is seemingly wrong What am I missing here?
Code:
Option Compare Database
Option Explicit
Sub tblNew()
Dim dbs As DAO.Database
Dim dbsFE As DAO.Database
Dim BackendPath As String
BackendPath = Mid(CurrentDb.TableDefs("InstProperties").Connect, 11) 'Skip over the ;DATABASE=
Set dbs = OpenDatabase(BackendPath)
Set dbsFE = CurrentDb()
dbs.Execute "CREATE TABLE tblNewTableIV (TWCmdID AUTOINCREMENT CONSTRAINT TWCmdID PRIMARY KEY)"
DoCmd.TransferDatabase acLink, dbs, dbsFE, acTable, "tblNewTableIV", "tblNewTableIV"
Set dbs = Nothing
End Sub