Error 3845 Linking

  • Thread starter Thread starter Finance guy
  • Start date Start date
F

Finance guy

The code below generates error 3845 as I am using an Access 2003 .MDB file
and the new table gets created in 2007 format. How can I create the table in
2003 format?

I attempted to convert the database to 2007 format but received multiple
errors when using the interface and importing all objects into a new
database.

With CurrentDb
Set tdf = .CreateTableDef(strTBName(i))
tdf.SourceTableName = strTBName(i)
tdf.Connect = ";DATABASE=" & ls_import_filename
.TableDefs.Append tdf 'ERROR
.Close
End With
 
your life would be easier if you jsut kept all your data in one place-
on a database server where it belongs

why do you need to write code like this?

linked tables are just awful for performance
 
Finance guy said:
The code below generates error 3845 as I am using an Access 2003 .MDB file
and the new table gets created in 2007 format. How can I create the table
in
2003 format?

I attempted to convert the database to 2007 format but received multiple
errors when using the interface and importing all objects into a new
database.

With CurrentDb
Set tdf = .CreateTableDef(strTBName(i))
tdf.SourceTableName = strTBName(i)
tdf.Connect = ";DATABASE=" & ls_import_filename
.TableDefs.Append tdf 'ERROR
.Close
End With


Let me make sure I understand. This code is running (under Access 2007) in
an MDB file, and you're trying to link to a table in an ACCDB file. Is that
correct?

So far as I know, this is just not supported, as the message says.

You tried to convert the MDB file to an ACCDB file, and you got errors?
What sort of errors? I would expect that they could be resolved.

If for some reason you really can't convert your MDB file to ACCDB format,
then I'd need to know more about why you need to link to the table in the
other database before I could comfortably suggest a workaround. However,
one workaround I can think of is to use a query that selects data from the
table *in the other database*, as in:

SELECT Field1, Field2, Field3
FROM Table1 IN 'C:\Your\Path\To\YourDB.accdb'
 
Dirk Goldgar said:
Let me make sure I understand. This code is running (under Access 2007)
in an MDB file, and you're trying to link to a table in an ACCDB file. Is
that correct?

So far as I know, this is just not supported, as the message says.

You tried to convert the MDB file to an ACCDB file, and you got errors?
What sort of errors? I would expect that they could be resolved.

If for some reason you really can't convert your MDB file to ACCDB format,
then I'd need to know more about why you need to link to the table in the
other database before I could comfortably suggest a workaround. However,
one workaround I can think of is to use a query that selects data from the
table *in the other database*, as in:

SELECT Field1, Field2, Field3
FROM Table1 IN 'C:\Your\Path\To\YourDB.accdb'


--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top