By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,471 Members | 2,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,471 IT Pros & Developers. It's quick & easy.

Is this possible?

P: n/a
Is it possible to delete objects in one MDB file from another MDB
file? Specifically, is it possible to delete a query, form, report.
etc. from MDB #1 by opening MDB #2 and performing some action or
running VBA code to affect the objects in MDB #1?

If it is possible, does anyone know how it is done and/or could share
some code that would accomplish this or get me started?

Any and all help is greatly appreciated.

TC
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use Automation to open the other .mdb file. See the help articles on
GetObject Function and CreateObject Function. Something like this:

dim acObj as Object
set acObj = CreateObject("Access.Application")

' Access 2K2 example
acObj.DoCmd.DeleteObject acTable, "Table Name"

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP+JpQoechKqOuFEgEQJlZQCg18nDEP2APA8VLUhOkghH5+ p9AuQAn0yy
Qq3ePVrzz5SSkrDvR6+VQUAj
=rU67
-----END PGP SIGNATURE-----

Tony Ciconte wrote:
Is it possible to delete objects in one MDB file from another MDB
file? Specifically, is it possible to delete a query, form, report.
etc. from MDB #1 by opening MDB #2 and performing some action or
running VBA code to affect the objects in MDB #1?

If it is possible, does anyone know how it is done and/or could share
some code that would accomplish this or get me started?

Any and all help is greatly appreciated.

TC


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.