I have a form that displays information from a parent table and a 1 to 1 child table. In the forms Record Source I am using a select that pulls from both tables as shown below.
When in normal edit mode all works as expected, I can change the members fields and the retirees information. When trying to do an add to the retiree table, it is also trying to insert a member record and causing a duplicate key. Now before adding the retiree, the member record must already exist. So basically when doing an add, all I need is the "SELECT * FROM Retirees" and dummy fields for the members information. Is there a way to change the record source when in add mode or maybe to designate that the "Members" fields are not to be sent with the update?
TIA
Mark
Code:
SELECT Members.SSNO, Members.FIRSTNAME, Members.LASTNAME,
Members.Address2, Members.CITY, Members.STATE, Members.ZIPCODE,
Retirees.*
FROM Retirees LEFT JOIN Members ON Retirees.SocialSecurityNumber = Members.SSNO;
When in normal edit mode all works as expected, I can change the members fields and the retirees information. When trying to do an add to the retiree table, it is also trying to insert a member record and causing a duplicate key. Now before adding the retiree, the member record must already exist. So basically when doing an add, all I need is the "SELECT * FROM Retirees" and dummy fields for the members information. Is there a way to change the record source when in add mode or maybe to designate that the "Members" fields are not to be sent with the update?
TIA
Mark