By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,209 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,209 IT Pros & Developers. It's quick & easy.

Preventing Autosave on form with multiple subforms

P: n/a
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.

Apr 26 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
As soon as you leave a subform the data will be saved.
You can not prevent that, other than going 'unbound'.
Maybe you could try temptables to 'collect the data' and some append-query's to save the data to the real tables?

But do you indeed need 9 subforms to collect your data or am I missing something here??

Arno R

"microb0x" <wo*******@gmail.com> schreef in bericht news:11**********************@j33g2000cwa.googlegr oups.com...
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.

Apr 26 '06 #2

P: n/a
Yes, Unfortuneatly, the design specs provided to me calls for 9
seperate tabs to organize the data being captured. Each tab basically
represents a different system the users are gathering data from to
imput into Access. I suppose some of the subforms could be combined
into a single table, however with a single subform I'm appearantly
going to run into this issue, so the number of tabs or subforms
shouldnt really be a factor other than amount of code required.

It appears I just have a lot of work ahead of me to make these forms
unbound....

Apr 26 '06 #3

P: n/a
"microb0x" <wo*******@gmail.com> wrote in news:1146070359.598148.228590
@j33g2000cwa.googlegroups.com:
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.


Access is good as it is.

--
Lyle Fairfield
Apr 26 '06 #4

P: n/a
"microb0x" <wo*******@gmail.com> schreef in bericht news:11**********************@u72g2000cwu.googlegr oups.com...
Yes, Unfortuneatly, the design specs provided to me calls for 9
seperate tabs to organize the data being captured. Each tab basically
represents a different system the users are gathering data from to
imput into Access. I suppose some of the subforms could be combined
into a single table, however with a single subform I'm appearantly
going to run into this issue, so the number of tabs or subforms
shouldnt really be a factor other than amount of code required.

It appears I just have a lot of work ahead of me to make these forms
unbound....


Temptables will be a lot easier than going unbound IMO.
Not difficult to copy table structures and change the query-strings for your (sub)forms.
But do it your way if you like.

BTW: I just saw your other (same) post at microsoft.public.access
Please do NOT multipost.

Arno R
Apr 26 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.