473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

deleting an object in another database

Hi Folk

I am trying to delete an object in another database, but from reading the
google newsgroup archives, it seems that this is not possible. Does anyone
know any easy work-arounds? Can you use the docmd.copy thing and override
the old one?

Cheers

- Nicolaas
Nov 13 '05 #1
3 9933
Br
windandwaves <wi*********@coldmail.com> wrote:
Hi Folk

I am trying to delete an object in another database, but from reading
the google newsgroup archives, it seems that this is not possible.
Does anyone know any easy work-arounds? Can you use the docmd.copy
thing and override the old one?

Cheers

- Nicolaas


You can certainly reference an external database and there should be no
reason you can't delete an object from it.

Something like..

Dim myDB as Datbase
Set myDB = OpenDatabase("c:\MySecondDB.mdb")
myDB.TableDefs("tblDeleteMe").Delete

(look up the help for syntax etc.. I'm "making it up" as I type :)

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #2
Br@dley wrote:
windandwaves <wi*********@coldmail.com> wrote:
Hi Folk

I am trying to delete an object in another database, but from reading
the google newsgroup archives, it seems that this is not possible.
Does anyone know any easy work-arounds? Can you use the docmd.copy
thing and override the old one?

Cheers

- Nicolaas


You can certainly reference an external database and there should be
no reason you can't delete an object from it.

Something like..

Dim myDB as Datbase
Set myDB = OpenDatabase("c:\MySecondDB.mdb")
myDB.TableDefs("tblDeleteMe").Delete

(look up the help for syntax etc.. I'm "making it up" as I type :)


Hi Bradly

That works for tabledefs and querydefs, but I need to delete modules and
forms..... and I do not think that this works.
Nov 13 '05 #3
Dim objAcc As Access.Application
Set objAcc = GetObject("C:\myOldDB.mdb")
objAcc..DoCmd.DeleteObject acForm, "frmBad"
objAcc.Application.Quit
Set objAcc = Nothing

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rick | last post by:
Hi, Does deleting an object more than one times incur undefined behavior? I think it doesn't but just making sure... thanks Rick
4
by: Fughal | last post by:
Hi, I have a big DB2 database and I need this database without any Data in it for testing something. I have made a backup of these db and restore it on a testing system. My Problem is now how...
3
by: kris.dorey | last post by:
Hi, Ive got the following code which seems ok but when the user runs the function for a second time I get an error message stating that the mdb is in use by another process. There is still an...
5
by: John Veldthuis | last post by:
My code works perfectly 100% when adding items to my ArrayList and updating the listbox. Works perfectly when deleting an item in the ArrayList when it is not the last entry but if it is the last...
46
by: DP | last post by:
hi, i've got a form, with a subform in it. i've got a delete button in the subform. the code i;ve got is; Private Sub cmdDeleteRecord_Click() msg = "Are you sure you want to delete this...
51
by: Joe Van Dyk | last post by:
When you delete a pointer, you should set it to NULL, right? Joe
9
by: Hamed | last post by:
Hello I have a DataGrid that a is bound to a DataTable. Some of the rows in the DataTable should not be deleted. How can I prohibit deleting of some identified rows? The problem could be...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
1
by: sphinney | last post by:
All, I'm not sure how to adequately explain my problem in two sentences or less, so at the risk of providing TMI, here's the condensed verion. I have developed an Access 2002 database file that...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.