Saving Form Info

K

katelin0429

Hello - I have made a form that MANY people will be using. Can I make the
form not write to the table until they hit the save button? I'm trying to
prevent them from entering have the data and then X out, which would make
quite a mess. I would like to set it up with a delete button, and they can
delete the whole form w/ that. Basically, I would like nothing actually
effects the stored data until they hit save. I could do it with temporary
tables, and have a query to delete the temp and write to the permentant, but
I have six subforms on the main form and I'm sure there is an easier way.
Thank you so much for all your help!!!!!! Katelin
 
C

Carl Rapson

In the Click event for the save button, set a form-level boolean flag that
indicates the button was clicked. Then in the Form_BeforeInsert and
Form_BeforeUpdate events you can check to see if the flag is set. If it is,
allow the Subs to proceed (do nothing). If it is not, set the sub's Cancel
parameter to True to cancel the Insert/Update.

Carl Rapson
 
K

katelin0429

Can you explain this a little more. What is "set a form-level boolean flag?"
Also, which form would I do the BeforeInsert and BeforeUpdate events on, the
main form, or all of them? Thank you so much for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top