M
microb0x
I have an application with a master form with a tab control containing
nine tabs, each tab contains a subform. I have command buttons on my
main form including: Save , Cancel , Close.
My question is, how can I prevent Access from auto-saving changed or
entered data on both the main form and any subform?
The main goal is to force the user to use the 'Save' button to save any
data. I need the 'Cancel' button to just undo any changes since
opening the form or since last save. And I need the 'Close' button to
just close the form without saving any changes since last time 'Save'
button was clicked.
In previous applications without subforms I was able to accomplish a
similar scenerio with using me.undo in the unload event of the form
and/or on the click event of both the Cancel and Close buttons. This
doesnt work with the subforms, because the command buttons are on the
main form and not each subform, nor would I want that. It is also not
working all the time with the data on the master form, certain
scenerios are still saving data when closing the form. It is also
auto-saving data on the subforms as I move between the tabs, I would
like to prevent this as well
Is there anyway to accomplish this goal? Only thing I could think of
would be to make each subform and/or field unbound, and pass the data
to the tables only at the time of clicking Save. Are there any other
options as this would be a lot of code for 9 subforms, some with as
many as 20 or so fields to populate?
Any guidance is appreciated as I'm on a tight time schedule to finish
development and deploy this app.
nine tabs, each tab contains a subform. I have command buttons on my
main form including: Save , Cancel , Close.
My question is, how can I prevent Access from auto-saving changed or
entered data on both the main form and any subform?
The main goal is to force the user to use the 'Save' button to save any
data. I need the 'Cancel' button to just undo any changes since
opening the form or since last save. And I need the 'Close' button to
just close the form without saving any changes since last time 'Save'
button was clicked.
In previous applications without subforms I was able to accomplish a
similar scenerio with using me.undo in the unload event of the form
and/or on the click event of both the Cancel and Close buttons. This
doesnt work with the subforms, because the command buttons are on the
main form and not each subform, nor would I want that. It is also not
working all the time with the data on the master form, certain
scenerios are still saving data when closing the form. It is also
auto-saving data on the subforms as I move between the tabs, I would
like to prevent this as well
Is there anyway to accomplish this goal? Only thing I could think of
would be to make each subform and/or field unbound, and pass the data
to the tables only at the time of clicking Save. Are there any other
options as this would be a lot of code for 9 subforms, some with as
many as 20 or so fields to populate?
Any guidance is appreciated as I'm on a tight time schedule to finish
development and deploy this app.