Password parameter for ImportExportData Macro

yus786

I do OK
Local time
Today, 21:17
Joined
Jun 25, 2008
Messages
121
HI all

I am creating a ImportExportData macro that will link to my tables in the BE

However the BE has a password. I was told this would require coding

Would some kind soul please help me?

I have even tried to 'convert macro to VB' and i get this:

Code:
DoCmd.TransferDatabase acLink, "Microsoft Access", "c:\test.accdb", acTable, "Table1", "Table1", False

I then tried to enter the password in the last segment (StoreLogin) ie:

Code:
DoCmd.TransferDatabase acLink, "Microsoft Access", "c:\test.accdb", acTable, "Table1", "Table1", False, "PASSWORD"

but that didn't work either, i got a "An expresiions you entered is the wrong data type for one of the arguments"

Please help
 
"An expresiions you entered is the wrong data type for one of the arguments"
I think you will find you are missing a parameter (and StoreLogin is a boolean value anyway), but either way you need to use an ODBC connection rather than the path you are using ("c:\test.accdb"). If you need to connect to a password protected db

see this link

http://msdn.microsoft.com/en-us/library/bb214131(v=office.12).aspx

In particular look at the last example

You might also want to look at this link

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209953

if you are connecting to more than one table
 
Thanks CJ_London, i'll start reading up
 

Users who are viewing this thread

Back
Top Bottom