title: Operation Not Supported on Linked Table
body: <p>When the function below executes '.Append fld' it produces Error 3057.  I suspect that a fully qualified name is needed but the method is escaping me.  The sub calling this function is passing by way of strTableName "tbl_elements" as it should but that is not enough for this function.</p>
  
  <p>I have tried fitting another bit of code that has successfully reached a Linked table.</p>
  
  <pre><code>CurrentDb.Execute "ALTER TABLE [" &amp; CurrentDb.TableDefs(strImportHoldingTable).Connect &amp; "].[" &amp; strImportHoldingTable &amp; "] DROP COLUMN romis_tran_id;"
  </code></pre>
  
  <p>Function in question below</p>
  
  <pre><code>Public Function CreateAutoNumberField(ByVal strTableName As String, ByVal strFieldName As String) As Boolean
  
  On Error GoTo Err_CreateAutoNumberField
  
      Dim db As DAO.Database
      Dim fld As DAO.Field
      Dim tdef As DAO.TableDef
  
      Set db = Application.CurrentDb
      Set tdef = db.TableDefs(strTableName)
      Set fld = tdef.CreateField(strFieldName, dbLong)
      With fld
          .Attributes = .Attributes Or dbAutoIncrField
      End With
      With tdef.Fields
          .Append fld
          .Refresh
      End With
  
      CreateAutoNumberField = True
  
  Exit_CreateAutoNumberField:
  
      Set fld = Nothing
      Set tdef = Nothing
      Set db = Nothing
      Exit Function
  
  Err_CreateAutoNumberField:
  
      CreateAutoNumberField = False
      With Err
          MsgBox "Error " &amp; .Number &amp; vbCrLf &amp; .description, vbOKOnly Or vbCritical, "CreateAutoNumberField"
      End With
      Resume Exit_CreateAutoNumberField
  
  End Function
  </code></pre>