Results 1 to 6 of 6

Thread: MS ACCESS "Save changes to the design of query"?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    111

    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:
    1. Private Sub cmdCloseAmendments_Click()
    2. On Error GoTo Err_cmdCloseAmendments_Click
    3.    
    4.     DoCmd.Close acForm, "frmAmendments", acSaveNo
    5.    
    6.     DoCmd.OpenForm "Switchboard", acNormal
    7.  
    8. Exit_cmdCloseAmendments_Click:
    9.     Exit Sub
    10.  
    11.  
    12. Err_cmdCloseAmendments_Click:
    13.     MsgBox Err.Description
    14.     Resume Exit_cmdCloseAmendments_Click
    15.    
    16. 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.

  2. #2
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    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"

  3. #3
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    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"

  4. #4
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: MS ACCESS "Save changes to the design of query"?

    Try switching the order.
    VB Code:
    1. DoCmd.OpenForm "Switchboard", acNormal
    2. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  5. #5
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    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

  6. #6
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width