record is saved

Liat

New member
Local time
Today, 15:17
Joined
Oct 27, 2005
Messages
6
When the user press 'tab' key the record is being saved. I would like to prevent it and enble record saving only when 'save' button is presed
 
Microsoft Access automatically saves the record you are adding or editing as soon as you move the insertion point to a different record, or close the form or datasheet you are working on.

What you're saying is that one of the above conditions is met whenever an user hits "tab".
You can't prevent this.

RV
 
Liat:

RV is correct, but you can ask the user to Save or Cancel. If Cancel is pressed, you can use the Undo method to clear what was entered.

SHADOW
 
1. change the Cycle property of the form to "current record". That will prevent the tab from moving to a new record.
2. If you want to control the saving of a record, you must put your code into the FORM's BeforeUpdate event. That event accepts a cancel argument which will allow you to cancel the save if you determine that you don't want the user to save the record. You could even go so far as to "undo" his changes although, I recommend against this unless the user ok's the option.
 

Users who are viewing this thread

Back
Top Bottom