because when you enter a record in an MS access form, the record will be automatically saved right? so how will i disable this feature? i only want the record to be saved when a "save button" is clicked.
Access saves the currently edited record whenever you change/switch to another record via Enter, Tab, or Mouse.
Using the mouse to click a button after editing a record (on the same form) is fine as the record is still in edit mode (as depicted by the pencil icon on the record selector).
All that remains is preventing Enter & Tab from parsing to another record. Best I can think of is to set the forms [blue]Cycle[/blue] property to [blue]Current Record[/blue].
Lushh - the automatic saving of a bound record on a form seems to be a 'feature' of Access that can not be disabled, per se.
The way I've gotten around this when necessary (and it's ugly, to say the least) is to use a temporary table to hold the data on your 'working' form, and when the "Save" button is pressed, I call a quick SQL INSERT INTO.. query to shoot the temporary record into the table that I want it in, and then delete the temporary record.
If the form is closed without the "Save", you've only saved into the temporary table, and that can easily be scratched when you're finished.
I routinely handle this by using custom navigation buttons and locking the mousewheel. When a form becomes Dirty, all navigation buttons are Disabled and a Save/Undo box pops up. Since all my forms are "full screen" there is no other way out until the user selects one or the other, after which all nav buttons are enabled again. Having to consciously make a decision seems to help the users to focus on the task at hand, which is important because, in this particular case, they are entering data pertaining to home health care visits, and entering dates and info on the wrong patient record would not be good. They are taught to always double check the patient name before saving the record.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.