docmd.deleteobject dont work 
Author Message
 docmd.deleteobject dont work

Hello!

I use VB5 in connection with Acc97.
I have a database c:\test.mdb, it contains a table tab

Now I do this in VB5:

dim db as database
set db=opendatabase("c:\test.mdb")
docmd.deleteobject actable, "tab"

this runs without error message.

but it dont delete the table tab. WHY???????????????????

any help is welcome.

regards, astrid kuhr



Sat, 26 Aug 2000 03:00:00 GMT  
 docmd.deleteobject dont work

Quote:
>I use VB5 in connection with Acc97.
>I have a database c:\test.mdb, it contains a table tab

>Now I do this in VB5:

>dim db as database
>set db=opendatabase("c:\test.mdb")
>docmd.deleteobject actable, "tab"

DoCmd. is not a Jet object (which is the only thing VB knows about.)

It is an Access object. The only way to call it from a VB program
would be to launch an actual copy of MSACCESS.EXE and control it via
OLE automation.

In VB you can accomplish the same thing as above with:

dim db as database
set db=opendatabase("c:\test.mdb")

db.tabledefs.delete "tab"

or...

db.execute "drop table tab"

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



Sun, 27 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DeleteObject not working with Access 97

2. DeleteObject to Delete Access Table Won't Work

3. Breakpoints dont work

4. vba dont works ...

5. ActiveDocument.SendFax Address:=.. dont work

6. RaiseEvent dont work in New() sub?

7. Datagrid em Webform - Paging dont work???

8. Using Excel as Datasource, dont work

9. Access database yes/no fields dont work with ado.net

10. Databinding checkbox checked dont work

11. Office dont't work after vb.net was installed

12. Manifest dont work with Common controls 6.0, why ?

 

 
Powered by phpBB® Forum Software