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

Access 2000: How to not save changes on exit

P: 1
I have got a form where I have among other controls have two subforms. The SourceObjects of the subforms are queries qrySub1 and qrySub2. When data is changed in a listbox-control the sql of the queries is changed. I use the property querydef.sql to change the SQL og the queries.

When closing the form I get a message where it asks me if I want to save the changed objects. Is there a way to stop the message box asking for saving the objects to come up?

I have tried to stop it in onFormClose, but it seems like the message box is created before the onFormClose.
Feb 20 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,768
Try to avoid changing the design of the forms themselves.
For this situation consider applying filters instead.

FYI: the code if you DID need to make changes to the design during a run is :
Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.Close(ObjectType:=acForm, _
  2.                  ObjectName:=Me.Name, _
  3.                  Save:=acSaveNo)
This assumes you're closing it from within its own code (ObjectName:=Me.Name).
Feb 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.