STOP: Do you want to save changes to the design of form 'Chart1'?

jerem

Registered User.
Local time
Tomorrow, 03:00
Joined
May 1, 2012
Messages
118
How can you stop this prompt? I have checked everywhere on internet and cannot find an answer!

I have a Navigation Form in Access 2010. First page has two subforms: Datasheet1 and Chart1.
Whenever I click on another tab of the Navigation Form I get the mentioned prompt! (unless I do a control+s before)

I have checked everywhere but can't seem to find. Some suggest to use the DoCmd.Close + Saveno but it doesn't apply here since I am not closing anything. Another was suggesting a code using .SetWarnings False but it doesn't work either.

Any genius who could give me an answer?
Thank you!
 
Well, I tend to do my research before posting anything... If I post, it really is because I couldn't find an answer anywhere else. So yes, these are the kind of thread I have read.

I just hope that an Access super MVP on the forum would come up with a solution.
 
Hello jerem, pwbrown was genuinely trying to help you out here.. I think pwbrown has actually helped you.. It would be good if you were a bit polite in expressing your views about the reply you were given.. No one is considered to know everything.. Even Access MVP's learn new stuff on here.. So please appreciate any response good/bad..

Coming to your problem.. Did you see the thread completely.. The third to the last post has your answer to some extent..
From what I have been able to read the "Do you want to save" message is a bug with the Navigation Forms that have datasheets as subforms. I've tried numerous attempts at a solution over the past week with turning on an off warnings and different times and trying to modify the filters with vba. I ended up realizing today that I needed to modify the filter and order by on the on load event of the datasheet subform. This is what I've done using what saberman had posted with a few additions. All of my form On Load events have the warnings set to True
Code:
Private Sub Form_Load()
     DoCmd.SetWarnings True
End Sub
In addition to setting warnings to true on the On Load events on the datasheet subforms I've also set the default filter and order by parameters via VBA so my On Load events for these forms would look like this.
Code:
Private Sub Form_Load()
     DoCmd.SetWarnings True
     Me.OrderBy = ""
     Me.OrderByOn = True
     Me.Filter = ""
     Me.FilterOn = False
End Sub
All of the On Enter events of the Navigation Form tabs have the warnings set to False
Code:
Private Sub Navigation_Service_Main_Enter()
    DoCmd.SetWarnings False
End Sub
My idea with this is that since I've turned off the warnings when a tab is clicked any changes that a user has made via a filter or sort will be saved without the "Do you want to save" prompt. I need to set the filter and order by parameters back to what I want basically undoing what I couldn't prevent being saved. Since my application is designed to be used at runtime by multiple people I needed to have it open consistently every time. So far it seems to work!
Try doing that.. Else as you say..
(unless I do a control+s before)
Force a SAVE, when the form looses its focus..
 
Last edited:
Hi Paul,
Thanks for your reply... Not sure I am following you on the "polite" part though. I cannot see where I have been impolite. I was just expressing the fact that I have been through all these threads but it seems that none provide a final solution, as well as my hope of getting a super MVP pulling out a rabbit off his hat.
I can appreciate that writing often convey parts of a message and misinterpretation is easy.

pwbrown - sorry if I offended you.

Coming to my issue... I have tried similar things without success. I will give it another try.
Thank you
 
This reply,
Coming to my issue... I have tried similar things without success. I will give it another try.
Thank you
Sounds far more better than
Well, I tend to do my research before posting anything... If I post, it really is because I couldn't find an answer anywhere else. So yes, these are the kind of thread I have read.
Its just when someone strikes down, the other person would not be comfortable to respond.. Just making this forum friendly and helpful for everyone.. :)

Well, if you have tried that.. and then on top of that add this..
Code:
Private Sub Form_LostFocus()
    DoCmd.Save acForm, Me.Name
End Sub
This will just give a force save, and when it loads again it will replace all filters and order by and give you the data based on the record set..
 
Alright, SetWarnings False for all the Navigation tab did the trick... However, now they are always off. What's the risk here?
 
Ok... No risk for SetWarning off, providing that your application is setup with necessary warnings to prevent users to screw the whole thing up.
Hence, in the On Open event of all the Navigation tabs use the
Code:
 DoCmd.SetWarnings False
Cheers
 

Users who are viewing this thread

Back
Top Bottom