Max Wanadoo
max.wanadoo at gmail.com
Thu Jul 9 02:55:06 CDT 2009
Hi List,
I have a BE which has an mdb password on it. It prompts for this when you
open it directly.
On the FE, I have code which re-links the BE on demand using this
structure:-
DoCmd.TransferDatabase acLink, "Microsoft Access", strPathMain,
acTable, strLinkThisTable, strLinkThisTable, False, False
During the transfer it will prompt for the user password.
1st Q. I would like this to be passed in code so that the user does not
need to enter it. Is this possible?
2nd Q. When I copy the BE from the Server to my PC and then run the same
relinking code, it does NOT prompt for the BE password. Why not? (it does
if it is opened directly, but not from within my code).
The code to determine which is:-
If bUserWantsNetwork Then
DoCmd.TransferDatabase acLink, "Microsoft Access", conDataPathNetwork &
conDatabaseMain, acTable, "mcmSystemInfo", "mcmSystemInfo", False, False
Else
DoCmd.TransferDatabase acLink, "Microsoft Access", conDataPathLocal &
conDatabaseMain, acTable, "mcmSystemInfo", "mcmSystemInfo", False, False
End If
NB. the table mcmSystemIno and another file holds details of which tables
are to be linked and it loops through them linking accordingly.
Max