linking tables and deployment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I getting ready to deploy my Access application which has a link table in it. Well the link table is based on my pc when I created it. Is there a way thru code to create a link table? Or have the link path relative to the location of the installed directory

Thanks in advance
Rodney
 
I use code similar to http://www.mvps.org/access/tables/tbl0009.htm to
prompt a user for the path to the mdb containing the table. You could
probably set the strNewPath based on the path of the current mdb.

--
Duane Hookom
MS Access MVP


rodney said:
Hello,

I getting ready to deploy my Access application which has a link table in
it. Well the link table is based on my pc when I created it. Is there a way
thru code to create a link table? Or have the link path relative to the
location of the installed directory?
 
It should be in a module. However, that code uses DAO. Access 2000 or 2002
don't include a reference to DAO by default.

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.1
Library

If you have both references, you'll find that you'll need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rsCurr as DAO.Recordset (to guarantee an ADO recordset, you'd use
Dim rsCurr As ADODB.Recordset)

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



rodney said:
Thanks, should the posted code be put in a module or a class module? I put
it in a module and I'm getting a compile-time error, saying user-defined
type not defined.
 
Thanks, should the posted code be put in a module or a class module? I put it in a module and I'm getting a compile-time error, saying user-defined type not defined

Function fIsRemoteTable(dbRemote As DATABASE, strTbl As String) As Boolean '''This line was highlighted
Dim tdf As TableDe
On Error Resume Nex
Set tdf = dbRemote.TableDefs(strTbl
fIsRemoteTable = (Err = 0
Set tdf = Nothin
End Functio

Thanks in advance
Rodne
 
Ok, got that thanks, but now I'm getting ahtAddFilterItem() function or sub not defined. Any ideas?
Thanks in advance,
Rodney
 
Back
Top