G
Guest
Hi,
I have two tables tblEquip and tblDeals that have the same primary key fiel
called DealCode.
I am trying to create a new record in the tblEquip that is based on an
existing DealCode number from the tblDeals. To select the DealCode in the
form I have created a combo box in a form that contains the following code in
the Row Source:
SELECT tblDeals.DealCode FROM tblDeals;
The combo box works fine whenever I am selecting DealCodes in records
already entered in the tblEquip, but when I try to create a new record with
the form I get an error message telling me that I am trying to insert a
duplicate record in the tblDeals.
I can see how this is happening based on the row source... but how should I
modify my code so that I can use the tblDeals to see the DealCode as the
source "for selection purposes", but write that code in the tblEquip and
avoid the tblDeal key violation message?
Thank you,
Trauton
I have two tables tblEquip and tblDeals that have the same primary key fiel
called DealCode.
I am trying to create a new record in the tblEquip that is based on an
existing DealCode number from the tblDeals. To select the DealCode in the
form I have created a combo box in a form that contains the following code in
the Row Source:
SELECT tblDeals.DealCode FROM tblDeals;
The combo box works fine whenever I am selecting DealCodes in records
already entered in the tblEquip, but when I try to create a new record with
the form I get an error message telling me that I am trying to insert a
duplicate record in the tblDeals.
I can see how this is happening based on the row source... but how should I
modify my code so that I can use the tblDeals to see the DealCode as the
source "for selection purposes", but write that code in the tblEquip and
avoid the tblDeal key violation message?
Thank you,
Trauton