access shutting down when sort form by date

P

papa jonah

I have a data entry form that normally (or at least historically) has
not had a "sort by" property included. It has been ordered (I guess by
some default) by the "designator" field.
I just told it to sort by date. It does so just fine. However, when I
attempt to add a new record, I get the error that says that Access must
shut down and tell Microsoft of my woes.
This continues until I remove the sort by reference. Is there a way to
get around this? Why would sorting it by date prohibit adding new
records and cause Access to shut down?

TIA
 
A

Allen Browne

There could be several reasons for this. Suggestions:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile 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"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, and reference ambiguities are
resolved.

If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html

If this form has a subform, and you are working in Access 2002 or 2003,
there is another issue that could cause this as well. Post a reply if this
describes your case and the above steps don't solve it.
 
P

papa jonah

Allen,
I am unclear on how to do this decompile step. I remember an MSDOS
window in other versions of windows but can not seem to find it on this
computer. Maybe it is because of my unworthy non-administrator status
(I'm at work). Maybe I am just not looking in the right place. Maybe
I am not supposed to use the MS DOS window.
Please advise.
 
A

Allen Browne

Your administrator may have blocked your ability to do this. If not, you
will find the command prompt in WinXP under:
Start | Programs | Accessories

Or you can use
Start | Run
and type the expression there.

Or you could create a shortcut on your desktop containing the expression.
 
P

papa jonah

If I am using Start/Run, do I need to modify the expression in someway?
I am using the quotes, copied the path out of the windows explorer,
and I am getting an error saying it can't find it.
 
A

Allen Browne

You will need to use your actual database name and path.

You will also need to use the correct path to where ever you have
msaccess.exe installed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top