Why does Access 2000 SP3 crash when I use TableDefs.Append?

D

dtecmeister

I have the following code to add a MySQL ODBC 3.51 Driver linked table to my
database. It works in Office 2003 but crashes Access in Office 2000 and
corrupts the linked table manager and the database. We're running Windows XP.

Dim RT As Database
Dim tb As TableDef
Set RT = CurrentDb()
Set tb = RT.CreateTableDef("Group_" + NewData)
tb.SourceTableName = "Group_" + NewData
tb.Connect = "ODBC;DSN=Realtime;"
RT.TableDefs.Append tb
Me.Group.Undo
Me.Group.Requery
Me.Group.Value = NewData

The RT.TableDefs.Append tb line is where it crashes unrecoverable.

Any ideas on why this happens and how I can correct it?
 

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