Unexpected Exit of Access

J

j

When I created a query with 2 subqueries, the report worked fine. Recently,
when I tried to run either the query, subqueries, report, or subreports
Access automatically closes, but the record-locking file still exists.
What does this mean? I suspect it means that the queries are too
complicated. Also, a while back, when I attempted to generate reports, I
received an error message stating that something was low on memory. I was
able to perform other functions on my computer, so does this have anything to
do with Access?
 
A

Allen Browne

It is actually very easy to crash Access using subqueries, esp. where those
subqueries are then use as input to futher queries.

Would it be possible to avoid the subquery, and stack one query on another
instead? I've used that approach on a number of occasions to work around
this problem.

We are assuming that you have turned off Name AutoCorrect as a cause of
crashing queries. Details:
http://members.iinet.net.au/~allenbrowne/bug-03.html
 
J

j

The reason I used the subqueries is to eliminate the effort required to alter
the queries when a change needs to be implemented and to implement
calculations. If there is no other way around this issue, then dealing with
the extra effort would be the only thing to do.

How would I go about stacking the queries as recommended? I am not very
familiar with the terms and have learned Access by a trial and error basis.

Also, I have just come across another problem, I tried making the file into
an mde file, but it gave me an error message. It just said that I could not
make the file into an mde file. How could I get around this error?
 
A

Allen Browne

By "stacking" queries, I mean saving a query, and using it as a "table"
input to another query. It's somewhat less flexible than a subquery if
that's what you need, but may get you out of trouble.

Is the Make MDE option greyed out? It will be if the file format is A2000
and you are working in A2002 or 2003. Converting will solve it:
Tools | Database Utilities | Convert.

If it is simply an error, then the database is partially corrupt. Decompile
a copy of the database by entering something like this at the command prompt
while Access is not running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

If that still does not solve it, follow the 6 steps for the 1st symptom in:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 
J

j

Following the 6 steps worked in creating the MDE file.
However, as I was compiling the code, why did it give me an error with the
..SetFocus method and with the DoCmd.SendObject command when I referenced a
text box on the form? The error message is: Method or data member not found.
When I make those lines comments, the code compiles fine. This error confuses
me because there are other instances of these methods in other parts of the
code, but there was no error for them.

Also, is there a way to export a report to PowerPoint? I tried looking for
it under Export, but could not find it. If there isn't a way to export it to
PowerPoint, how would you recommend getting the report into PowerPoint?

Thank you so much for your assistance! It is much appreciated!
 
A

Allen Browne

Okay: Access is unable to SetFocus to the text box. If this fails at compile
time, it means Access thinks the name is not valid. Double check the name is
not something different (like "Text91").

If you are convinced the name is right, then it may have been corrupted by
Name AutoCorrect. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Compact the database:
Tools | Database Utilities | Compact
Then decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

If it still doesn't work, you have the name wrong.
 
Top