CreateTableDef Does Not Accept vbAttachedTable as Parameter 
Author Message
 CreateTableDef Does Not Accept vbAttachedTable as Parameter

Anyone know of any fixes to the following problem?

I'm trying to programmatically attach an Access table to the current Access
database.  I've created a tabledef with the following statement:
        Set tdf = db.CreateTableDef("tblTable", dbAttachedTable, "tblTable",
";DATABASE=C:\ACCESS\TEST1.MDB")

However, when the code runs, I get an "Invalid Argument" error.  The
dbAttachedTable constant is part of the Microsoft DOA 3.0 Library that
comes with MS Access.

Thanks for your help!

C Whisman



Mon, 09 Aug 1999 03:00:00 GMT  
 CreateTableDef Does Not Accept vbAttachedTable as Parameter

Hi "Office Development"

Quote:
>I'm trying to programmatically attach an Access table to the current Access
>database.  I've created a tabledef with the following statement:
>    Set tdf = db.CreateTableDef("tblTable", dbAttachedTable, "tblTable",
>";DATABASE=C:\ACCESS\TEST1.MDB")

You don't actually specify 'dbAttachedTable'. Jet determines that the
table is attached by virture of the fact that you have specified a
"connect" argument.

In Access 2.0 you could specify this and it wouldn't cause any
problems. In Access 97 you must NOT specify 'dbAttachedTable' or else
you get the error you reported.

Try leaving that argument off.

-- Jim Ferguson, FMS
   http://www.fmsinc.com



Mon, 09 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Parameters do not accept Null Values

2. Password NOT SAVED w/CreateTableDef

3. SQL doesnt accept boolean parameters !!!

4. Accepting command line parameters with VB

5. How to accept parameters

6. Form accepting parameter?

7. How to accept Command Line parameter in VB6.

8. accepting parameters on startup

9. Creating VB EXE that accepts parameters when called

10. Creating a VB exe that accepts parameters

11. How to Accept Startup Parameter?

12. VB program that accepts parameter

 

 
Powered by phpBB® Forum Software