Re: how to delete an object in another db
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 20:36:43 -0400
Slight typo. Marsh put comma Delete rather than period Delete.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Marshall Barton" <marshbarton@xxxxxxxxxx> wrote in message
news:rpjo73tdrnaolfdrrjr8dnvsjuv0vbdguj@xxxxxxxxxx
Wez.k wrote:
"Marshall Barton" wrote:
Wez.k wrote:Thanks for your reply. However there seems to be a syntax error with the
Could anyone tell me if its possible to delete an object such as a
table,
form, query etc in another database, and if so how is it done?
Open the other mdb file and operate on its db object
Dim otherDb As Database
Set otherDb = OpenDatabase("path to other mdb file")
otherDb.TableDefs,Delete "sometable"
TableDefs line because the code window is showing it in red. Also, will
this
method work for forms, queries and reports?
I don't see what you tried, so I can't spot any syntax
errors.
The Delete method will also work for queries, but not for
forms or reports.
It might be better if you used Automation so you can employ
SelectObject and DeleteObject.
OTOH, This is starting to sound like an attempt to update an
existing database with modified forms, reports, etc. If so,
it is not a good idea. Instead you should distribute a new
front end mdb and use SQL DDL statements to modify the
backend tables.
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: how to delete an object in another db
- From: Marshall Barton
- Re: how to delete an object in another db
- References:
- Re: how to delete an object in another db
- From: Marshall Barton
- Re: how to delete an object in another db
- From: Marshall Barton
- Re: how to delete an object in another db
- Prev by Date: Re: How do I test the value of a specific character within a strin
- Next by Date: Re: How do I test the value of a specific character within a strin
- Previous by thread: Re: how to delete an object in another db
- Next by thread: Re: how to delete an object in another db
- Index(es):
Relevant Pages
|
Loading