TableDef Question

barlowr70

New member
Local time
Today, 12:02
Joined
May 13, 2008
Messages
6
I have an application with an Access 97 front end and an SQL server back end. In acces 97 I use the code below to determine a tables name and connection string.

Dim tbl As TableDef

For Each tbl In CurrentDb.TableDefs
Debug.Print "TABLE... " & UCase(tbl.Name) & " ... " & tbl.Connect
Next tbl

I am currently updating the Front to Access 2003 and I can get most of a tables properties using the following code, but can't get the connection property. Does anyone know how to this is done?

Dim obj As AccessObject

For Each obj In CurrentData.AllTables
Debug.Print obj.Name, obj.Type
Next obj

Thanks in advance

Roy.
 
the connection property - do you mean ther connect string?

thats

tabledef("anytable").connect
 
The "old" way should still work. Why change it ?
 
I am looking for the connection string but using the ADO rather than DAO

Regards
 
I am looking for the connection string but using the ADO rather than DAO

Regards
 
why ado

DAO is the standard mechanism in both A97 and A2003 - I would kepp with that

Access changed to ADO in between, but returned to DAO for A2003 (and before?)
 
why ado

DAO is the standard mechanism in both A97 and A2003 - I would kepp with that

Access changed to ADO in between, but returned to DAO for A2003 (and before?)
 

Users who are viewing this thread

Back
Top Bottom