Pobo
Apr 25th, 2006, 12:31 PM
Hi
Got a real head banger case here!
I have one subform with a query as it's source object on a main form. When I open and close the main form without making any changes, Access still asks me:
"Do you want to save changes to the design of query 'qryFinalAmendments'?"
A command button on the main form is clicked and the event has the following code:
Private Sub cmdCloseAmendments_Click()
On Error GoTo Err_cmdCloseAmendments_Click
DoCmd.Close acForm, "frmAmendments", acSaveNo
DoCmd.OpenForm "Switchboard", acNormal
Exit_cmdCloseAmendments_Click:
Exit Sub
Err_cmdCloseAmendments_Click:
MsgBox Err.Description
Resume Exit_cmdCloseAmendments_Click
End Sub
The Form close event has no code. Can anyone tell me why I would be getting this message asking me if I would like to save changes that have not been made?
Is there a way that I can stop this message appearing - I have already tried using "DoCmd.SetWarnings False" but this doesn't stop the message being displayed?
Thanks
Pobo
Got a real head banger case here!
I have one subform with a query as it's source object on a main form. When I open and close the main form without making any changes, Access still asks me:
"Do you want to save changes to the design of query 'qryFinalAmendments'?"
A command button on the main form is clicked and the event has the following code:
Private Sub cmdCloseAmendments_Click()
On Error GoTo Err_cmdCloseAmendments_Click
DoCmd.Close acForm, "frmAmendments", acSaveNo
DoCmd.OpenForm "Switchboard", acNormal
Exit_cmdCloseAmendments_Click:
Exit Sub
Err_cmdCloseAmendments_Click:
MsgBox Err.Description
Resume Exit_cmdCloseAmendments_Click
End Sub
The Form close event has no code. Can anyone tell me why I would be getting this message asking me if I would like to save changes that have not been made?
Is there a way that I can stop this message appearing - I have already tried using "DoCmd.SetWarnings False" but this doesn't stop the message being displayed?
Thanks
Pobo