error copying properties from a linked table to a new access database

D

dlf

Hello,

I'm copying an Access linked table to a separate Access file. I create
a new database file and copy all existing database objects to it.

Everything works fine but the copy of database table properties
(speciall Required Fields...)

I use the following code that runs without errors:

For i = 0 To CurrentDb.TableDefs(Nombre).Indexes.Count - 1
Set ind = New Index
ind.Name = CurrentDb.TableDefs(Nombre).Indexes(i).Name
ind.Fields = CurrentDb.TableDefs(Nombre).Indexes
(i).Fields
ind.Unique = CurrentDb.TableDefs(Nombre).Indexes
(i).Unique
ind.Primary = CurrentDb.TableDefs(Nombre).Indexes
(i).Primary
ind.Required = CurrentDb.TableDefs(Nombre).Indexes
(i).Required
tbl.Indexes.Append ind
Next

Apparently the properties specified in the SQL Server 2005 tables, are
not copied to the Access field. Is this a kind of bug? Am I making any
mistake?

Thanks a lot for your help in advance
 

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