Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File Password for Linked Table

Status
Not open for further replies.

Bunting

MIS
Mar 19, 2002
50
0
0
GB
I'm trying to write a batch file command to run an Access macro. The Access database itself is not password protected so the command opens it. However the macro involves linked tables from a database which is password protected so I need to include log-on details for it. Can anyone tell me how to do this? So far I have

Code:
"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "L:\Reporting\Report\Data.mdb" /x QueryMacro

I have tried adding the /pwd command but this assumes the password is for the Access database.
 
Can you store the login information directly in the macro? For example, with the TransferDatabase action, you can input ODBC info including the password. Or you could call a function with the macro that uses a connect string to connect to the linked tables.

Paul
 
This thread: thread1121-1404753 includes details of how to create a linked table with embedded connection strings.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top