473,605 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9972
Br
windandwaves <wi*********@co ldmail.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.md b")
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*********@co ldmail.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.md b")
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.Applicat ion
Set objAcc = GetObject("C:\m yOldDB.mdb")
objAcc..DoCmd.D eleteObject acForm, "frmBad"
objAcc.Applicat ion.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
3582
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
3543
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 can I delete all Data because there are more than 500 tables in the db, it’s impossible to delete all by hand. I thought theres is another way to do this: only copy the structure of the database into another DB, here is my problem how can I copy...
3
2985
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 ldb for the life of the application even after calling oldebconnection.close and gc.collect. Any ideas?
5
2423
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 entry and you select another index it goes boom!!!. Funny thing is the SelectedIndex Changed routine fires off perfectly and then crash after the return from this code. Now looking around the news groups it appears to be a bug in the .net...
46
4406
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 film rental record?" Style = vbYesNo + vbQuestion + vbDefaultButton2
51
10300
by: Joe Van Dyk | last post by:
When you delete a pointer, you should set it to NULL, right? Joe
9
1718
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 specified in the following format too: There is a DataView object that I want to prohibit deleting of some of its DataRowView objects. that is: when drv.Delete() is called (drv is the
11
3661
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) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
1
3181
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 contains a form, multiple queries and multiple reports. The purpose of the form is to allow the user to run various queries against my company's Sybase server and display a report. Since the queries return ADO recordsets from the Sybase server,...
0
7934
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8424
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8415
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8286
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5445
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1537
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.