Stopping autosave of record

jesus_hairdo

Registered User.
Local time
Today, 16:28
Joined
Sep 28, 2001
Messages
32
not too sure if this is the correct forum for this, but here we go.
I have a form which has a save record button on it. I want to have the form only save the record when manually saving. and to NOT save it when moving on to a new record or closing the form (ie disable Access's autosave 'feature').

thanks

Jamie
 
I would skin that cat like this:

Set your forms Tab cycle to CURRENT RECORD ONLY. You would need to remove the CLOSE "X" on the form also. The user can tab their little heart out, but until they hit the "SAVE" button..no save. You could code the button to offer "Save Record? or Undo?" and then Me.Undo or goto new record.

Hope that gets you off and running!
 
cheers for that, sounds like just the job.

thanks

Jamie
 
can I add a question to that I hope I'm not infringing on any forum etiquitte. What about the record saving/new record when you use the scroll button (roller) on the mouse? I tried putting the tab cycle to current record only but it seems to work inconsistently. Thanks.
 
Another method is to create a global (for the form module) variable. Set it to "No" in the onCurrent event and set it to "Yes" in the click event of the Save button. Then in the BeforeUpdate event, check the value and remember to reset it to "No" before exiting the event. If it is "Yes" let the save happen. If it is "No", display a msgbox asking whether or not to save. If the answer is "No", cancel the update event.
 
Pat,
will this get confused if more than one user is in the table?

David R
 
No. Variables are held in memory on the Client PC.
 
any chance of a bit of coding of this, (i'm very new to VBA, this would be only my 3rd use of VBA so still not used to syntax)

cheers
 

Users who are viewing this thread

Back
Top Bottom