Link BE with codes

C

ChoonBoy

Can some one help me with this.

I am using Dev Ashish codes
http://www.mvps.org/access/tables/tbl0009.htm

My BE has a password "test"

I modified the following line below to incoporate the password.

Set dbLink = DBEngine(0).OpenDatabase(strDBPath, False, False, "MS
Access;PWD=test")

I run the code using a command button

Private Sub Command9_Click()
fRefreshLinks
End Sub

I get this error and the link does not change.

Table 'Tbl_ValueMS Access' was not found in the database.
\\IBM-89878\A_IBM1_shr\BSCBE.mdb. Couldn't refresh links.

Tbl_Value is in the BSCBE.mdb.

Please tell me where else I need to modify to get it going smoothly.

Thanks
 
P

Paul Shapiro

You said that "Tbl_Value is in the BSCBE.mdb", but the error message says
"Table 'Tbl_ValueMS Access' was not found in the database". Use the debugger
to check the tblDef.Connect string you are using. You might also check the
documentation for that property, or manually link a table from the
password-protected database and then check the value of that property to see
how it should be formatted.
 
P

Paul Shapiro

So what is the value of the Connect property for that linked table after you
link it manually? You can open the FE linked table in design mode and look
at the Table Properties. Use the Connect string that was created from the
manual link as the template for your code's assignment of the connect
string.

SAMPLE (without a password):
DATABASE=\\ServerName\ShareName\FolderPath\MyData.mdb;TABLE=MyTable

That would be the string you assign to the connect property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top