Searching for and linking tables

mazza

Registered User.
Local time
Today, 12:55
Joined
Feb 9, 2005
Messages
101
Can anyone help me with an DB example where after installation and opening a database it searches for a backend and link the tables from that back end.

I have an program that has 2 backends. I would like the users to choose the location of the files (network or hard drive) but that has implications on the address ofthe linked files.
The program is run on Access Runtime 2002

ideally upon opening I would like the system to check if it contains tables, if not it should open the browse diaglog to search for the backend and link the tables from the backend to the front end...
 
encountered a problem as I am using 2000/2002 and yr examples are 97

in declaruing the function I encounter a poblem in 2000/2 in declaring Dim dbsTemp as databse. the system give me the error : compile error - user defined type not defined. How do I declare this in 2000/2?



Public Function ReLink()
Dim strFolderName As String
Dim rst As Recordset
Dim dbsTemp As Database <------------
Dim tdfLinked As TableDef
Dim strConnect As String
Dim strSourceTable As String
Set dbsTemp = CurrentDb
 
Check your references and be sure you select DAO 3.6 library, then delecare the Db as:

Dim dbsTemp As DAO.Database
Dim rst As DAO.Recordset

HTH

Dave
 

Attachments

  • DAO.JPG
    DAO.JPG
    49.1 KB · Views: 228
thanks

it all works apart from a minor detail..
I have secured my backend database with a password using the default security settings in Access. With this password in place your program will not open and relink the tables.
When I remove the passowrd settings there is no problem.

Is there a way to open the backend database with your codes and reading the password?
 

Users who are viewing this thread

Back
Top Bottom