ADO access to MDB file on network drive

  • Thread starter Thread starter Kenny-Z
  • Start date Start date
K

Kenny-Z

Hi,

I'm having no luck googling for this one (or ADHing...), and I'm sure
it's simple or at least common:

From Access VBA on one PC I want to make a connection to an MDB on
another network PC...

To connect to the local machine I can use:

rst.Open "tbl_Contacts", _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Filespec, _
adOpenForwardOnly, adLockReadOnly

where Filespec is a path to the local file...

thanks for any help,

kz
 
Kenny,

Re this and your previous post, why not link the tables to your master
database and use an append query. If you want to you could change the link
programmatically to select each workstation in turn.

Link one workstations table and call it WKSTable. You can find the connect
string by printing CurrentDb.TableDefs("WKSTable").Connect. You can change
the connect string to another table by setting the same property to a new
value using the new database path instead of the one originally printed.
Then call CurrentDb.TableDefs("WKSTable").RefreshLink.

WKSTable will now refer to the relevant table on another workstation.

Ultimately you would be better to use a common table on a single computer
and include a code for each particular user. Each user would link to this
table.

Rod Scoullar.
 
Back
Top