T
trexx
Hello everyone,
I have a form with a subform in it. The subform has a query as its
source object.
Since the fields inside the query always load with the same width,
either the user or the db has to resize the columns of the query's
datasheet. Regardless whether the user resizes the columns manually or
whether I do it via code, closing the parent form always prompts the
user to save changes to the layout of the subform's query.
Frankly, it's irrelevant whether the changes are saved or not because
the query is rebuilt each time the form is opened. I just want it to
not show the "save layout changes?" dialog. I've Tired the OnClose and
OnUnload events both on the query's datasheet and the form but when the
form is closed (when the user presses the red "X" box on the top right
of the screen), the dialog always appears before the events are
triggered. I've turned off the SetWarnings also without any
difference. Even DoCmd.Close (with the option to prompt set to none)
also triggers AFTER the dialog appears!
If I use the AllowDesignChanges property on the subform's datasheet,
then the columns can't be resized. If I make the subform set its
sourceobject to "" (empty quotation marks) then the dialog doesn't
appear, but the user shouldn't have to do that before closing the form
and I haven't figured out how to do it without having a separate
"close/exit" button to my already crowded form.
All I want is for the user to be able to use the form and then click
the form's red "X" to close the form without the db asking him
anything.
Help...
Juan
I have a form with a subform in it. The subform has a query as its
source object.
Since the fields inside the query always load with the same width,
either the user or the db has to resize the columns of the query's
datasheet. Regardless whether the user resizes the columns manually or
whether I do it via code, closing the parent form always prompts the
user to save changes to the layout of the subform's query.
Frankly, it's irrelevant whether the changes are saved or not because
the query is rebuilt each time the form is opened. I just want it to
not show the "save layout changes?" dialog. I've Tired the OnClose and
OnUnload events both on the query's datasheet and the form but when the
form is closed (when the user presses the red "X" box on the top right
of the screen), the dialog always appears before the events are
triggered. I've turned off the SetWarnings also without any
difference. Even DoCmd.Close (with the option to prompt set to none)
also triggers AFTER the dialog appears!
If I use the AllowDesignChanges property on the subform's datasheet,
then the columns can't be resized. If I make the subform set its
sourceobject to "" (empty quotation marks) then the dialog doesn't
appear, but the user shouldn't have to do that before closing the form
and I haven't figured out how to do it without having a separate
"close/exit" button to my already crowded form.
All I want is for the user to be able to use the form and then click
the form's red "X" to close the form without the db asking him
anything.
Help...
Juan