Re: Saving Query shuts Access down...???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Jerry's answer is the most likely; however, I've seen two other scenarios
cause this also.

1) Jet and/or MDAC patches not up to date.
2) While this shouldn't matter, sometimes it does. Remove all UNNEEDED
brackets and parentheses from the query while in SQL view and try to save
the query. By unneeded, for the brackets you can probably remove them from
around any table or field name that does NOT have a space in it; for the
parentheses, Access insists on putting multiple layers of parentheses around
each part of the WHERE clause. Use only those that are needed to maintain
the desired logic.

If none of the above works, try setting the SQL of the query using code. If
that doesn't work, you may at least get a better error message to let you
know what is going on.

Example:
strSQL = "SELECT ..." 'etc
CurrentDb.QueryDefs("MyQuery").SQL = strSQL

--
Wayne Morgan
MS Access MVP


"Monish" <Monish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9920E8DB-39A3-47DB-A29A-543EA98EAC6D@xxxxxxxxxxxxxxxx
I am seeing my application shut down (although a *.ldb file is still
listed)
when I try to save a query!

I am working in Access 2002, but over the weekend sent my db home to work
there (where I have Access 2003).

Can anyone please let me know why this is happening?

Thanks,
M


.



Relevant Pages

  • Re: SQL Division
    ... however, is that you CANNOT, then have any brackets in your subquery. ... brackets and parentheses within the subquery ... the SQL text remains identical. ...
    (microsoft.public.access.queries)
  • Re: SQL Division
    ... however, is that you CANNOT, then have any brackets in your subquery. ... SELECT OrderID, max ... brackets and parentheses within the subquery ... the SQL text remains identical. ...
    (microsoft.public.access.queries)
  • Re: Reference control in subform
    ... I'm starting to think the SQL query may be the better option! ... You will notice that I also removed the brackets from within the rson ... The SQL for the subform is: ...
    (microsoft.public.access.forms)
  • Re: can this be done with a subquery?
    ... Your SQL is fine but it's approximately my first query. ... MaxAs LatestDate ... *further brackets* within a subquery ...
    (microsoft.public.access.queries)
  • Re: Jet SQL and Virtual tables/subqueries qiestions
    ... Perahps we've begin to uncover some bugs in the Access query ... If you PASTE SQL test in the following format into the SQL window ... unnecessarily bracketed field inside the virtual table brackets ... around a field or table name within the VirtTbl1 subquery, ...
    (microsoft.public.access.queries)