I'm having a problem with some code in the database that I am working on.
When I load this database on my computer it runs smoothly and without a hitch. When I load the same database on another computer, it doesn't run. Both computers are running ACCESS 2000. Am I missing something in the functions? Could someone give me a reason as to why it would work on one computer and not the other?
I really need help with this one.
Thanks,
Andie
Function changeTransFile(DbFile As String)
Dim dbs As Database, tdf As TableDef
' Return Database variable that points to current database.
Set dbs = CurrentDb
Set tdf = dbs.CreateTableDef("transition"
' Attach dbase III file
tdf.Connect = "dBASE III;DATABASE=C:\myfile"
tdf.SourceTableName = DbFile
' Debug.Print dbs.TableDefs("transition"
dbs.TableDefs.Append tdf
' save choice to db
' Debug.Print dbs
End Function
When I load this database on my computer it runs smoothly and without a hitch. When I load the same database on another computer, it doesn't run. Both computers are running ACCESS 2000. Am I missing something in the functions? Could someone give me a reason as to why it would work on one computer and not the other?
I really need help with this one.
Thanks,
Andie
Function changeTransFile(DbFile As String)
Dim dbs As Database, tdf As TableDef
' Return Database variable that points to current database.
Set dbs = CurrentDb
Set tdf = dbs.CreateTableDef("transition"
' Attach dbase III file
tdf.Connect = "dBASE III;DATABASE=C:\myfile"
tdf.SourceTableName = DbFile
' Debug.Print dbs.TableDefs("transition"
dbs.TableDefs.Append tdf
' save choice to db
' Debug.Print dbs
End Function