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

new item is automatically saved

P: n/a
I have a product inventory database with a form to enter new products.
I used the wizard to add a button to save the new item upon pressing
it, however I noticed that the record is saved anyway. How can I
prevent this? My product number is not an autonumber, but is
programmed to look up the next sequential number based on product type
and display that number as the new record, but I need the ability to
close the form without it automatically being saved. Thanks all!

Mar 16 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Whenever you leave the record and all validation and other
requirements are met, then the record is saved. If you want it to be
done only by clicking a button, then you need to prevent leaving the
record in any other way. This may mean setting the Cycle property of
the form to Current Record, or adding code to the BeforeUpdate event
that cancels the update if the button was not clicked. You may also
have to remove the navigation buttons and record indicator from the
bottom of the form. There are many ways to move from record to record
depending on the design of the form, so you'll need to account for
them all.

Mar 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.