G
Guest
I am using paired listboxes to input information into a table that I would
like to have bound by a one to many relationship. With the add button, I
have an insert into statement that adds the value to the foreign table and
moves that item from the first listbox to the other listbox. This works fine
if it is an existing record but if it is a new record it errors because of
the relationship of the primary key to foreign key because the autonumber is
not excepted yet. I did find that if I put an entry into one of my subforms
on one of my pages that it makes the record perminant and the sql statement
will work, however that form will not be used until a later time. If I
remove the relationship with the primary and foreign key it will work but if
the primary record is deleted the foreign record is not. Is there an easy
way to make it so the new record will become permanent through code to solve
this so I can use the relationship? Thanks in advance.
like to have bound by a one to many relationship. With the add button, I
have an insert into statement that adds the value to the foreign table and
moves that item from the first listbox to the other listbox. This works fine
if it is an existing record but if it is a new record it errors because of
the relationship of the primary key to foreign key because the autonumber is
not excepted yet. I did find that if I put an entry into one of my subforms
on one of my pages that it makes the record perminant and the sql statement
will work, however that form will not be used until a later time. If I
remove the relationship with the primary and foreign key it will work but if
the primary record is deleted the foreign record is not. Is there an easy
way to make it so the new record will become permanent through code to solve
this so I can use the relationship? Thanks in advance.