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!

Append query to external Access Database with a password

Status
Not open for further replies.

whovey

Technical User
May 7, 2001
4
0
0
US
I am trying to export data from one password protected access database to another using an append query. I don't want to link the tables because the export is only for archive purposes. I can get the query to work fine when there is no password on teh external database, but I can't seem to find the correct syntax to make it work when the password is applied. I am using the following SQL statement in VB.
Code:
[\code]
DoCmd.RunSQL ("INSERT INTO Adjustments IN 'c:\Accounting\AcntArchive.mdb'[;pwd=password] " & _
              " SELECT Adjustments.* FROM Adjustments" & _
              " WHERE (((Adjustments.[Job #])=[Forms]![Select Job #]![Job #]));")
[code][\code]
When run, I get a "No database specified in connection string or IN clause".  Does anyone know the correct syntax for this?

All help is greatly appreciated!
 
Sorry. I have no response. I am also having this problem with the connection string. I've tried everything! Including messing around with the ODBC settings. Anyone know how to access a remote table where the database is password protected?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top