PC Review


Reply
Thread Tools Rate Thread

cascade update/delete question

 
 
Jamie
Guest
Posts: n/a
 
      23rd Jul 2004
I have two tables with a one to one relationship with
cascade update/delete checked. On the main form I have a
button that is linked to a popup form that uses the second
table. Everything is fine, so long I edit a current
record, but when adding a new employee the related field
in the second table is not added. I thought the
update/delete is suppose to handle this? The second table
has the same field as the main table for the primary field.

Jamie
 
Reply With Quote
 
 
 
 
Terry
Guest
Posts: n/a
 
      23rd Jul 2004
Hi Jamie,
The popup form has no link to the recordset in the main form. You would be
best using a mainform/subform linked on the primary keys, then you would
find it should work.
Regards

"Jamie" <(E-Mail Removed)> wrote in message
news:31e301c470ea$9d4bdf70$(E-Mail Removed)...
> I have two tables with a one to one relationship with
> cascade update/delete checked. On the main form I have a
> button that is linked to a popup form that uses the second
> table. Everything is fine, so long I edit a current
> record, but when adding a new employee the related field
> in the second table is not added. I thought the
> update/delete is suppose to handle this? The second table
> has the same field as the main table for the primary field.
>
> Jamie



 
Reply With Quote
 
Jamie
Guest
Posts: n/a
 
      23rd Jul 2004
The problem Terry is there is too much data to fit on a
subform. : (

thanks,

Jamie

>-----Original Message-----
>Hi Jamie,
>The popup form has no link to the recordset in the main

form. You would be
>best using a mainform/subform linked on the primary keys,

then you would
>find it should work.
>Regards
>
>"Jamie" <(E-Mail Removed)> wrote in

message
>news:31e301c470ea$9d4bdf70$(E-Mail Removed)...
>> I have two tables with a one to one relationship with
>> cascade update/delete checked. On the main form I have a
>> button that is linked to a popup form that uses the

second
>> table. Everything is fine, so long I edit a current
>> record, but when adding a new employee the related field
>> in the second table is not added. I thought the
>> update/delete is suppose to handle this? The second

table
>> has the same field as the main table for the primary

field.
>>
>> Jamie

>
>
>.
>

 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      24th Jul 2004
Hi Jamie.

The cascading relationships do not cause a new record to be added to the
related table. You can use the AfterInsert event of your form to
automatically insert the other record as well, by executing an Append query
statement generated in code.

However, that won't solve the cause of your problem. If you have this many
fields, and are using another table with a one-to-one relation to get more
fields, there is a serious problem with the data structure. You need to
create a series of tables with one-to-many relations, instead of these
monster tables. There is a built-in tool that may help you to analyze the
table and suggest an alternative structure:
Tools | Analyze | Table

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jamie" <(E-Mail Removed)> wrote in message
news:31e301c470ea$9d4bdf70$(E-Mail Removed)...
> I have two tables with a one to one relationship with
> cascade update/delete checked. On the main form I have a
> button that is linked to a popup form that uses the second
> table. Everything is fine, so long I edit a current
> record, but when adding a new employee the related field
> in the second table is not added. I thought the
> update/delete is suppose to handle this? The second table
> has the same field as the main table for the primary field.
>
> Jamie



 
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
Cascade Delete and Update Issue Linda RQ Microsoft Access Database Table Design 4 7th Nov 2007 03:15 PM
Update and Delete cascade =?Utf-8?B?c2NvdHQ4NDEwNw==?= Microsoft Access VBA Modules 0 21st Feb 2007 03:05 AM
Relationships - Cascade Update and Delete Vayse Microsoft Access ADP SQL Server 0 16th Aug 2006 05:00 PM
How to enforce cascade update/delete? =?Utf-8?B?Q2hyaXMgQnVybmV0dGU=?= Microsoft Access 3 2nd Nov 2005 09:56 PM
Cascade Update & Delete =?Utf-8?B?S2FyZW4=?= Microsoft Access Database Table Design 10 15th Sep 2005 06:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 AM.