none
Stop The annoying message "do you want to save changes to design of the form message" RRS feed

  • Question

  • Behavior:  

    Access 2007 DB with mutiple Form (Windows not tabbed ones).

    In a Form vba module, I’m doing frequently (In response to Current Event) design changes to sub forms (Runtime Fields formatting).  

    Problem:

    On closing the form, Access alerts about the changes made to sub form and this is really annoying:

    "Do you want to save changes to design of the form message"

    Workaround 1 : I've tested the command  : DoCmd.Save acForm, SubFormName without success, Access can’t find the sub form and the command results with this error (The objet “SubFormName” is not opened).

    Workaround 2 : Disabling/Enabling Access warning is not an option for me

    Question: Is there a way to automatically save or ignore design changes to sub form in a runtime?

    Thursday, October 22, 2015 9:34 PM

Answers

  • Hi El,

    >> "Do you want to save changes to design of the form message"

    For stopping this message, I suggest you save the form every time after you change the SubForm. You do not need to run command save the Mainform instead of SubForm.

    Here is a simple code:

    Private Sub Command0_Click()
    Me.SubForm.Form!text0.Width = 2
    DoCmd.Save acForm, Me.Form.Name ‘Me.Form.Name is used to get the name of mainform
    End Sub
    Private Sub Command2_Click()
    Me.SubForm.Form!text0.Width = 2000
    DoCmd.Save acForm, Me.Form.Name
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, October 23, 2015 2:52 AM

All replies

  • Question: Is there a way to automatically save or ignore design changes to sub form in a runtime?

    Hi El Majdouli Kamal,

    How do you do the changes to the subform? I assume by going in the design mode of the subform.

    You can also set almost all properties of the subform - and the controls - in memory using VBA. These modifications are not saved, so without the annoying message.

    Imb.


    • Edited by Imb-hb Thursday, October 22, 2015 9:53 PM 'and the controls' added
    Thursday, October 22, 2015 9:51 PM
  • Hi El,

    >> "Do you want to save changes to design of the form message"

    For stopping this message, I suggest you save the form every time after you change the SubForm. You do not need to run command save the Mainform instead of SubForm.

    Here is a simple code:

    Private Sub Command0_Click()
    Me.SubForm.Form!text0.Width = 2
    DoCmd.Save acForm, Me.Form.Name ‘Me.Form.Name is used to get the name of mainform
    End Sub
    Private Sub Command2_Click()
    Me.SubForm.Form!text0.Width = 2000
    DoCmd.Save acForm, Me.Form.Name
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, October 23, 2015 2:52 AM