|
-
Apr 25th, 2006, 12:31 PM
#1
Thread Starter
Lively Member
MS ACCESS "Save changes to the design of query"?
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:
VB 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
Last edited by Pobo; Apr 25th, 2006 at 12:35 PM.
-
Apr 25th, 2006, 12:44 PM
#2
Re: MS ACCESS "Save changes to the design of query"?
is this the subform:
DoCmd.Close acForm, "frmAmendments", acSaveNo
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 12:48 PM
#3
Re: MS ACCESS "Save changes to the design of query"?
no.. thats to close itself (the form with a subform in it) right??
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Apr 25th, 2006, 01:01 PM
#4
Re: MS ACCESS "Save changes to the design of query"?
Try switching the order.
VB Code:
DoCmd.OpenForm "Switchboard", acNormal
DoCmd.Close acForm, "frmAmendments", acSaveNo
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 25th, 2006, 03:50 PM
#5
Frenzied Member
Re: MS ACCESS "Save changes to the design of query"?
Access is annoying in the way that it asks if you want to save things. Excel too. You can try DoCmd.SetWarnings False before code, setting back to True after the code runs. You can also set this as a general option for your install of Access in Tools > Options to work on all dbs. But there are some warnings this doesn't work for.
Gotta take girls to karate, can't elaborate right now, hope this helps.
Last edited by salvelinus; Apr 25th, 2006 at 04:02 PM.
Tengo mas preguntas que contestas
-
Apr 25th, 2006, 04:25 PM
#6
Re: MS ACCESS "Save changes to the design of query"?
Note that SetWarnings and DisplayAlerts only take the default choice of the msgbox. If the default is acceptable then that should be ok.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|