Hi all,
I am working on a project and the database i have set up pulls data from another access database. I am using the docmd.transferdatabase command and it is working great, however the database i am pulling from is password protected. I know the passowrd and I want it to be automatically entered for the user so they are not prompted to enter a password when they click the button that runs the transferdatabase command, I searched everywere and all i can find is documentation on how to use a passowrd for a DSN database, however I want to try and keep this one DSNless if possible, please advise here is my code if it helps
I am working on a project and the database i have set up pulls data from another access database. I am using the docmd.transferdatabase command and it is working great, however the database i am pulling from is password protected. I know the passowrd and I want it to be automatically entered for the user so they are not prompted to enter a password when they click the button that runs the transferdatabase command, I searched everywere and all i can find is documentation on how to use a passowrd for a DSN database, however I want to try and keep this one DSNless if possible, please advise here is my code if it helps
Code:
Private Sub wingschedclick_Click()
On Error Resume Next
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "B-2 Sched Data"
DoCmd.DeleteObject acTable, "Range Sched Data"
DoCmd.DeleteObject acTable, "AR Sched Data"
DoCmd.SetWarnings True
DoCmd.TransferDatabase acImport, "Microsoft Access", "\\Szl-fs-02\509oss\OSW\mission tracking\wingsched.mdb", acTable, "B-2 Sched Data", "B-2 Sched Data", False
DoCmd.TransferDatabase acImport, "Microsoft Access", "\\Szl-fs-02\509oss\OSW\mission tracking\wingsched.mdb", acTable, "Range Sched Data", "Range Sched Data", False
DoCmd.TransferDatabase acImport, "Microsoft Access", "\\Szl-fs-02\509oss\OSW\mission tracking\wingsched.mdb", acTable, "AR Sched Data", "AR Sched Data", False
End Sub