Access closes when saving a query.

Posted on 2011-02-14
Last Modified: 2012-05-11
I'm trying to update a select query.  When I go to save the query, Access closes.  When I reopen the db and look at the query, my chgs are not saved.  Other queries work OK.  What could the issue be?
Question by:vsllc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
LVL 75
ID: 34890971
Try the basics

Compact & Repair the db

If not fix

Delete the query, do a Compact & Repair, then recreate the query

If no fix, Import all objects (except Linked tables) into a blank db.

LVL 11

Expert Comment

ID: 34891072
Do you get the same results when
     creating a NEW query
     Editing a different query  (in short 1 or 2 queries or ALL queries)

If it is just the one query...  copy the SQL to the clipboard and save it as a NEW query
if all queries...   the container is corrupt...   get them into a new container

Author Comment

ID: 34891316
None of the three options worked.  Could it be it's too large?  It's a lot of code.
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

LVL 75
ID: 34891340
Can you upload the db ?


Author Comment

ID: 34891439
No.  I'm going to break it into 2 queries and see if that fixes it.  Is there generally a character limit on the queries?
LVL 75
ID: 34891482

Attribute       Maximum
Number of enforced relationships       32 per table, minus the number of indexes that are on the table for fields or combinations of fields that are not involved in relationships*
Number of tables in a query       32*
Number of joins in a query       16*
Number of fields in a recordset       255
Recordset size       1 gigabyte
Sort limit       255 characters in one or more fields
Number of levels of nested queries       50*
Number of characters in a cell in the query design grid       1,024
Number of characters for a parameter in a parameter query       255
Number of AND operators in a WHERE or HAVING clause       99*
Number of characters in an SQL statement       Approximately 64,000*

Author Comment

ID: 34891561
Interesting.  I'm using Access 2002.  Is this comparible?
LVL 75
ID: 34891574

Accepted Solution

vsllc earned 0 total points
ID: 34891718
OK.  This fixed it, but not sure what implications this solution will have on the db.  Any ideas?
LVL 11

Expert Comment

ID: 34891842
Seems to be specific to 2002...  interesting...  skiped from 97 to 2003...   I missed all the fun...

Don't know what if anything shutting down autocorrect will do to you.... but if it works...  your ahead of the game...
LVL 75
ID: 34892088
Guess I should have though of the Name Auto Correct issue.  I always turn if off.  


Author Comment

ID: 34892304
OK.  It works, I'm happy.  If something comes up I'll deal with it then!

Author Closing Comment

ID: 34932159
This setting change fixed the issue.

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question