Ignoring Layout Save Dialog box

  • Thread starter Thread starter Jimbo
  • Start date Start date
J

Jimbo

I have a subform in a form. If I change say the column width in the subfrom
and then exit the Main form, it prompts me to save changes to the format of
the subform. I would like to avoid this message. I want to ignore all
changes. How do I keep the user from being bothered by this message?

In code, I also have the same problem. If I directly change the subform
properties such as:

[sfmMySubForm].Form.DatasheetFontHeight = 8
[sfmMySubForm].Form![MyField].ColumnWidth = 4000

this will cause the prompt to appear as well. I thought about placing the
changes in code to the query itself, but I haven't figured out how to do
this. Does anyone know how?

Thanks in advance,
... Jim..
 
I have a subform in a form. If I change say the column width in the subfrom
and then exit the Main form, it prompts me to save changes to the format of
the subform. I would like to avoid this message. I want to ignore all
changes. How do I keep the user from being bothered by this message?

In code, I also have the same problem. If I directly change the subform
properties such as:

[sfmMySubForm].Form.DatasheetFontHeight = 8
[sfmMySubForm].Form![MyField].ColumnWidth = 4000

this will cause the prompt to appear as well. I thought about placing the
changes in code to the query itself, but I haven't figured out how to do
this. Does anyone know how?

Thanks in advance,
.. Jim..

All I can suggest is that you use a close button to save the form, and
explicitly use the acSaveNo parameter on the Close:

DoCmd.Close acForm, Me.Name, acSaveNo


John W. Vinson[MVP]
 
John,

Thanks for the idea.

It still didn't work. It does close the form, but the prompt to save the
query remains after the form has closed. Any other ideas?

... Jim..

John Vinson said:
I have a subform in a form. If I change say the column width in the
subfrom
and then exit the Main form, it prompts me to save changes to the format
of
the subform. I would like to avoid this message. I want to ignore all
changes. How do I keep the user from being bothered by this message?

In code, I also have the same problem. If I directly change the subform
properties such as:

[sfmMySubForm].Form.DatasheetFontHeight = 8
[sfmMySubForm].Form![MyField].ColumnWidth = 4000

this will cause the prompt to appear as well. I thought about placing the
changes in code to the query itself, but I haven't figured out how to do
this. Does anyone know how?

Thanks in advance,
.. Jim..

All I can suggest is that you use a close button to save the form, and
explicitly use the acSaveNo parameter on the Close:

DoCmd.Close acForm, Me.Name, acSaveNo


John W. Vinson[MVP]
 
John,

Thanks for the idea.

It still didn't work. It does close the form, but the prompt to save the
query remains after the form has closed. Any other ideas?

I thought that you were being asked to save the *form*.

I'm actually leaving on a trip early tomorrow and won't have time to
resolve this. Please start a new thread, and post ALL of the code -
it's not due to the lines that you did post.

John W. Vinson[MVP]
 
Back
Top