[AccessD] Using TransferDatabase to link table from password protectd db

jeffrey.demulling at usbank.com jeffrey.demulling at usbank.com
Thu Apr 15 15:03:23 CDT 2004


I have the following code in a database.  Works fine if there is no
password on the database.  However I need to add a password to the database
the is being linked to.  How can I modify the code so that it accepts a
password and does not prompt the user for one?


Sub linkdatatable(mytable As String)

    'Link in tables for query
    If IsLinked(mytable) = False Then
        DoCmd.TransferDatabase acLink, "Microsoft Access", GetDataFile,
acTable, mytable, mytable, False
    End If
End Sub


TIA






More information about the AccessD mailing list