By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,665 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,665 IT Pros & Developers. It's quick & easy.

Programatically Enter Data Into main Form And Subform

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Susan" <ss******@earthlink.net> wrote in message
news:X_**************@newsread3.news.atl.earthlink .net...
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

You want to programmatically enter data into a main form and a related
subform, but you don't know if you want to save it?
Interesting. Why not decide if you want to save the data BEFORE you
programmatically enter the data into the main form and the related subform?

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.