Supress "Save" prompt after resizing form by code?

E

Ed from AZ

I use DoCmd.MoveSize to resize my form on Form_Load and in the code of
two buttons. How can I supress the "Do you want to save changes to
the design?" message when I close?

I tried setting Me.Dirty = False, but the code kept coming back as an
invalid reference to Dirty - I finally realized that when it hit that
spot, the database window was becoming the active window and the
object of "Me", and probably doesn't have a Dirty property.
Everywhere else I use Me to refer to the controls, it works just fine.

Ed
 
J

Jeanette Cunningham

Ed,
use of DoCmd.MoveSize does not usually give that message.
If you don't want to save design changes you can add acSaveNo
DoCmd.Close acForm, Me.Name, , acSaveNo

Jeanette Cunningham
 
E

Ed from AZ

Thank you for responding, Jeanette.

Just realized I am forgeting to mention that I'm using Access 2003.
And I'm getting this message when I'm using the X to quit the form.

Would I put this in Form_Unload or Form_Close?

Ed
 
J

Jeanette Cunningham

I would think in the form unload - if not working as you want, try the close
event.

Jeanette Cunningham

Thank you for responding, Jeanette.

Just realized I am forgeting to mention that I'm using Access 2003.
And I'm getting this message when I'm using the X to quit the form.

Would I put this in Form_Unload or Form_Close?

Ed
 
E

Ed from AZ

I finally resolved the issue by simply putting DoCmd.Save after each
instance of resizing the form.

Ed
 
J

Jeanette Cunningham

Glad you found a fix.

Jeanette Cunningham

I finally resolved the issue by simply putting DoCmd.Save after each
instance of resizing the form.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top