PC Review


Reply
Thread Tools Rate Thread

Delete and Create Relationship from Code

 
 
=?Utf-8?B?QnJ1Y2U=?=
Guest
Posts: n/a
 
      23rd Jun 2004
How do you Delete and Create Relationship from Code?

I need to severe a relationship so that i can run a make table query. Doens't work if there is a relationship.

Bruce
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      23rd Jun 2004
Look at relations collection and CreateRelation Method Example in online
help

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Bruce" <(E-Mail Removed)> wrote in message
newsE70E0D2-022F-4890-9AA7-(E-Mail Removed)...
> How do you Delete and Create Relationship from Code?
>
> I need to severe a relationship so that i can run a make table query.

Doens't work if there is a relationship.
>
> Bruce



 
Reply With Quote
 
Tim Ferguson
Guest
Posts: n/a
 
      23rd Jun 2004
"=?Utf-8?B?QnJ1Y2U=?=" <(E-Mail Removed)> wrote in
newsE70E0D2-022F-4890-9AA7-(E-Mail Removed):

>
> I need to severe a relationship so that i can run a make table query.
> Doens't work if there is a relationship.
>
>


This does not make sense: making a new table cannot have any effect on
existing tables and relationships. If you are deleting an old table prior
to repopulating it, you could simply empty it instead:

DELETE FROM MyTable WHERE TRUE;

(yes, the criterion is redundant, but reminds people that it is a
potentially devasting command!). The advantage of this is that it's quicker
and does not disrupt the database as you have found. It will also
automatically pick up any referential violations amongst the imported
records.

Hope that helps


Tim F

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create relationship by VBA Code a Microsoft Access Form Coding 1 25th Feb 2008 06:42 AM
How to Delete a Relationship in VBA =?Utf-8?B?UGV0ZXIgSGliYnM=?= Microsoft Access 3 6th Aug 2006 04:16 PM
Create/Delete access queries from VB code nitaarvind@gmail.com Microsoft Access Queries 1 1st Jun 2006 11:10 AM
Relationship Will Not Delete ILoveAccess via AccessMonster.com Microsoft Access 1 11th Nov 2005 10:16 PM
delete a relationship Steve Microsoft Access 1 18th Jul 2003 02:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:56 PM.