Object shows up twice in the Save dialog

Mark LaGrange
Mark LaGrange used Ask the Experts™
Hello - what would cause a given object to show up twice in the Save dialog when I try to close it (please see attached image)?

When I click "Yes", the subform stays open, and when I try to close it, I get the Save dialog again.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
Distinguished Expert 2018

You may have opened/edited the subform both as part of the main form and on its own.
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

are you trying to save a query with the same name as the form? or maybe a code module?
Distinguished Expert 2017

Is this repeatable?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

John TsioumprisSoftware & Systems Engineer

If this happens every single time no matter what then probably you have some kind of corruption....so compact and repair or even better decompile and compact and repair to see if this fixes it..i must admit i have never encountered this case
fwiw, I'm getting the old "Invalid Operation" error on this particular subform when it open.
When I trace through it in Debug and hit the following line:
     "If frmSub.Form.RecordsetClone.RecordCount > 0 Then"
I get this error
      "...refers to an object that is closed or no longer exists"

This fixed it:
Stopped Access via the Task Manager
Opened the form in Design, blanked out the Record Source, saved the subform
Opened the form in Design again, re-entered the Record Source query, saved & closed.

This is not a good solution; I think there is some corruption going on there, even though I have Repair'ed and Decompile'd many times.
I was just hoping the thing about seeing the form twice in the Save dialog would ring a bell with somebody.
Thank you all for your responses.
Distinguished Expert 2017

It does sound like corruption.
"Compact On Close" is set, I have Decompile'd many times.
Database was developed in Access 97, and I have been bringing it along up through to 2016.
I've imported into a new blank db many times (usually makes problems - 3,300 objects, qry JOIN's invariably get broken)
When I went from 2003 to 2010, I imported everything into a blank db; still didn't help this particular problem.
Distinguished Expert 2017

Do NOT compact on close.  The FE, if it is designed correctly, doesn't bloat and the BE is shared by many users and is opened and closed hundreds of times during the day so you have to manage compacting the BE on a scheduled basis.

FMSINC.com offers a tool to manage the BE.  You, when you are developing, need to back up (first) and then compact frequently.  Sometimes multiple times per day.  Take the extra time to close Access, back up, reopen and compact.  This avoids any potential problems that might happen if something fails in the compact.  When you are ready to distribute a new FE to the users, compact it one more time before putting it in the master folder.  When the users download it, it will be as small as it can be.  It will bloat slightly as each query is recompiled but not a lot.  I always run my FE from a shortcut that downloads a fresh copy so my users always get a new copy of the FE every time they open the app.  This doesn't add much to the initial load time and it dramatically reduces the potential for corruption.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial