p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Access 2003 VBA Programmer's Reference (http://p2p.wrox.com/forumdisplay.php?f=133)
-   -   Foreign key not updating with Primary key (http://p2p.wrox.com/showthread.php?t=59567)

xavier1945 June 28th, 2007 08:18 PM

Foreign key not updating with Primary key
I have created a database with about 15 tables. They are divided: 8 for consumer information (and they all work as expected); 5 for retailer information and 2 for problem resolution (they don't work as expected. The problem is they don't create the child record when a new parent record is created. When I create a new record in retailer I get the new record, but in retailer address it does not create new record unless I type in the retailer primary key number - this is the same problem with phone number, email, etc. This happens with the problem resolution tables as well. The relationships are 1 to many from retailer table to retailer address, phone, email etc; with join type equal.

I created a main form that has the constant consumer information. On that form are tabs for each of the remaining tables in the database. Using the forms there I can see all data in the database. I can not create a new record after the retailer form is used to enter the name of the retailer.

I hope that I have not been to wordy. Any thoughts on correcting my problem is greatly appreciated. I sure would like to know if this is fixable or do I need to start over an build an entirely new database.

Thank you very much for any suggestions[?]

tanu80 June 29th, 2007 08:27 AM

i am looking for the same things


Hi This is tanaya looking for some guide in developing .net application

xavier1945 July 4th, 2007 09:48 PM

I fixed the issue. Use VBA to synchronize the primary key to the foreign key in the second and third independent forms. Works like a charm. The book "Fixing Access Annoyances" was a great help with this problem.

Thanks again

All times are GMT -4. The time now is 09:09 PM.

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