Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping "save changes" message on subforms when form closes

Status
Not open for further replies.

PaulCoop

Programmer
Apr 3, 2001
31
GB
Version: Access 2000
Platform: NT4

I have a form that has a subform on it that shows a table in datasheet view. (Please note that the source object is a table not another form)

If I manually re-order the table via the right-click option menu and then close the form, even though I use the acSaveNo option (Docmd.Close acForm, "form", acSaveNo), Access insists on asking if I want to save the changes to the design of the subform's table. Obviously this option is only refering to the form object itself and not the subform with it.

Is there anyway to stop this happening as I have tried all the obvious (or what I think is obvious) solutions and the help files appear useless.

Paul Cooper
 
Hi Paul,

What you need to do is in the On Load event of your Form:

DoCmd.SetWarnings False

Then in the On Close event of the Form:

DoCmd.SetWarnings True

Don't use SetWarnings anywhere else in your code.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top