I have a bound form and subform and am trying to enter the data in both forms
programatically. The Linkmaster and Linkchild properties are set. My intent is
to be able to look at the data before it is saved and then choose to save it or
undo it. I have a Save button that just closes the form and a Cancel button that
does an undo and then closes the form. I first enter data into the main form
and then enter code into the subform. After the code runs, I get an error
message that essentially says there is no matching value for the foreign key in
the main form's table. If I programatically save the main form record after
entering the data in the main form and then go on to programatically enter the
data in the subform, the code runs and no error arises. However, I then have a
saved record that I can not undo. I'm concerned that if I code to delete rather
than undo, when the database is in use, deleting will lead to bloating the
database.
How can I programatically enter data into both the main form and subform without
having to first save the data in the main form?
Thanks!
Susan