Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2004, 10:25 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linked Tables

I'm trying to delete records on a table but I can't.

1) How do I find out what other table it is liked to.
2) How do I delete records on a table that is linked to another table?

I'm using Access 97/ VBA

 
Old July 28th, 2004, 01:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Do you mean "joined"? The two tables have a join established between them with referential integrity enforced. That prevents you from deleting a record in a child table if it contains a foreign key to a record in the primary table. You would have to delete the record in the primary table first. To view the relationhsip between the two tables, click the Relationships toolbar button in the Database Window. You can delete a relationship (or set its properties) by right clicking on the line that joins the two tables in the relationships window.

HTH,

Bob

 
Old July 28th, 2004, 01:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

The same holds true if you are actually talking about a "linked" table, but in that case, you would need to edit or delete the relatioinship in the backend database. You can't edit or delete relatioinships inherited from a linked database.

Bob

 
Old July 28th, 2004, 03:01 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't really know if the table is linked or joined. When I right click the table and select properties, it says "Table: Linked Access". Also, when I click on relationship I see nothing. However, When I select to view the relationship while in the Backend I see most of the tables that are joined. Unfortunately, I don't see the table in question. Now I am really lost. I still don’t know how to find out to who the table is linked or joined to, or what table is the primary table.

Thanks for any help


 
Old July 28th, 2004, 04:09 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, My Bad, I went to the Front End and right clicked on the blank relationship window and selected "show all" and I included the table in question. Unfortunately, that table does not have a relationship line. Now what do I do????

Thanks for any help

 
Old July 28th, 2004, 04:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Quote:
quote:that table does not have a relationship line
Does it have a primary key defined? Not having one can cause linked tables to be read-only.

Bob

 
Old July 28th, 2004, 05:08 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I apologies for my ignorance but I am really new at this. How do I find out if it has a primary key defined? I don’t think the table is read-only because I can write to it just find. Furthermore, the reason I think it’s a linked table is because when I click to open the design it warns me with the fallowing:

“Table “xxxxx” is a linked table with some properties that can’t be modified.

Thanks in advanced r any help






Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked tables problem gbrown Access 3 August 24th, 2006 01:15 PM
Linked Tables edojan Access 1 July 20th, 2006 10:49 AM
Finding linked tables elansolutionsltd Access VBA 4 January 16th, 2006 11:00 PM
Linked Tables ru1 Access 1 September 21st, 2005 07:24 AM
help with two linked tables query footohi Access 2 August 25th, 2005 10:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.