Microsoft
Software
Hardware
Network
Question : Access 2007 error refreshing links to a BE with password
Hi Experts,
This is my first question so hope it's clear.
I am developing a FE/BE Access 2007 database (not upgraded) where I need to refresh the links if the BE is moved. I'm using the Dev Ashish relink code as is , and without the BE having a password it works fine.
However when I add a BE password, this is what happens:
I changed the following 2 lines of code:
Set dbLink = DBEngine(0).OpenDatabase(N
ame:=strDB
Path, Options:=False, ReadOnly:=False, Connect:=";PWD=pw")
And for the table connect:
.Connect = ";Database=" & strDBPath & ";PWD=pw;"
The following line in the code...
strDBPath = fParsePath(collTbls(i))
gives
strDBPath = "tSysMS Access;PWD=pw;DATABASE=C:\
Documents and Settings\... etc"
so when the next line executes
strTbl = fParseTable(collTbls(i))
returns table name table "tSysMS Access" not the correct table name "tSys"
Consequently, get the Err.Raise cERR_NOREMOTETABLE error.
I've thought of stripping out the "MS Access" from the table name, but suspect I've missed something else.
Can anyone suggest a solution?
Answer : Access 2007 error refreshing links to a BE with password
Replace the line
fParseTable = Left$(strIn, InStr(1, strIn, ";") - 1) to
with
fParseTable = Left$(strIn, InStr(1, strIn, ";") - 10)
to strip the MS Access off and it appears to work.
Random Solutions
Change CommonProgramFiles
A Christmas Card challenge
Late bindingan ActiveX component
Excel chart with two Y - axis (vertical)
Dynamic? form fields
user must change password at next login is greyed out
macro to insert headers
Save unbound combobox column value in Access 2007
Icons on desktop don't completely refresh
can you help me? the problem in registering DTS dll files.