Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Records

Status
Not open for further replies.

Centauri117

Programmer
Jul 9, 2003
5
US
What I'm trying to do is to keep my database from saving records automatically. I'd like to have a SAVE button so that when a person adds a record, they have to click that button to have the database save it. Currently, as soon as something is typed into a field it is recorded. The default "SAVE" button created using a Wizard seems rather pointless since Access saves everything without confirming that you want to save it. Also, is there a way to be notified of any changes to any records? Thanks!
 
I've got a similar situation myself (want to wait to commit records). I plan on making a temporary table, inserting the new records into it. Then do some sanity checking, and when ready, insert them into the 'permanent' table.

I'm a very inexperienced Access coder, so insert standard disclaimer here ;-) There may be some kind of 'commit' capability already built in to Access (I'm using straight Access, not a regular SQL server back-end).

--
JR
 
Hi Centauri117,

When your form is bound to a record source it comes with automatic updating - that is what bound means.

When you change the value of an individual control and move the focus away from it, its updated value is saved in a buffer. When you move to a new record (or close your form) the actual record is updated from the buffer.

You have the option, in the Before Update events to add your own code in which you can do whatever you want - validate the input, ask the user for confirmation, cancel the update, etc. so you should be able to control the 'automatic' events as well as the 'manual' ones and get what you want.

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top