φ(..) ビボ~6 φ(..)

主にAccess、VBAに関する備忘録

ODBC リンク先変更

    Dim cnString    As String
    Dim tdf         As TableDef
            
    cnString = "FILEDSN=n:\Test1.dsn"
    
    For Each tdf In db.TableDefs
        '''If tdf.Attributes = dbAttachedODBC Then
        If tbDef.Attributes And (dbAttachedTable Or dbAttachedODBC) Then
            tdf.Connect = cnString
            tdf.RefreshLink
        End If
    Next