Very confused

goldmedallist

Registered User.
Local time
Today, 22:58
Joined
Jun 24, 2005
Messages
16
My question is essentially about the saving of information into the underlying database. I have been searching the forums and havent had any luck in finding what I wanted. There were a number of similar threads but I couldnt find any replies which could really point me in the right direction.

1. I am trying to prevent the underlying data from being changed until I click the save command button. It cant seem to work since even before I click the save button, the record is already written.

I tried using Before update cancel = true but that prevents me from moving away from the control. Also, I tried using edit locked but that still records the changes once i made it on the form.

What is the most common way of people saving records upon confirmation? And how do you prevent automatic recording? Any advice would be very much apperciated.

TK :(
 
goldmedallist said:
What is the most common way of people saving records upon confirmation?

I don't know what save button you were referring to (a custom one? ) but when you bind a recordset to a form then the records are loaded in and displayed one at a time.

When you close a form the connection to the recordset is closed and, if there are any changes to the record, then these are saved.

If you want to prevent a record being saved then you need to use the form's BeforeUpdate event to ask the user if they wish to save the information and, if not, then a simple Me.Undo should suffice.
 
Thanks very much SJ,

It wasnt until I read your reply that I realised I totally forgot about the form's Before update property.

All along I tried Before Update for every single control and that means I had to click yes/no multiple times just to get through a form and that was the reason I got pretty frustrated and thought there must be a better way around it.

Thanks a lot for that pointer once again!
 

Users who are viewing this thread

Back
Top Bottom