Date fields crashing system

D

David

I have a VERY simple Access 2000 program that is running
on several computers that use the Access 2000 Run-Time.
About half of these computers process the program without
any problems while the other half generate a Run Time
error that crashes the whole program and shuts it down.

I have lined out my code to determine the cause of the
problem. Any code dealing with:

Me.ExpirationDate=Date

or

Me.ExpirationDate=Null

or

If Me.ExpirationDate < Date Then....

generate the problems. When I remove these lines as a
whole, the program operates without crashing. If I line
out one, the program will operate fine until it hits one
of these lines, then it crashes.

What I fail to understand is why the code works on some
computers, yet does not with others. It is the exact same
version of Access 2000 Run Time on all the computers, so
is the problem somewhere on the computers individually?
Oh, and the problem does not show up on the full version
of Access 2000 I use to program.

Any ideas, thoughts, concepts, or precise knowledge on how
to solve this is appreciated. Thanks!!!
 
A

Allen Browne

Hi David

These intermittent things can be hard to track down.
Here is a sequence to try.

1. On your development copy, make sure the Name AutoCorrect boxes are
unchecked under:
Tools | Options | General
Explanation:
http://allenbrowne.com/bug-03.html
Then compact to really get rid of this stuff completely:
Tools | Database Utilities | Compact.

2. Deselect any references that are not essential to your application.
Ideally, this will come down to 3. If you are not familar with setting
references, see:
http://allenbrowne.com/ser-38.html
Check that the application still compiles. From the code window:
Debug | Compile.

3. Decompile a copy of your file, by entering something like this at the
command prompt while Access is not running. It's all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
The compact again.

4. Replace the problem references (only) with:
Me!ExpirationDate
Once in a rare while, Access gets confused and won't even compile a form
with the dot. It seem so happen more often if ExpirationDate is a field (not
a control), and the table is attached, so it's a workaround for when you
need it.

5. Create an MDE to package for the runtime:
Tools | Database Utilities | Make MDE
The MDE file cannot decompile on the users' system.

6. Create the new runtime package. Be sure to check the box to include the
System components so the right versions of the libraries are installed as
well.

7. Make sure that ALL users have installed the latest updates for both ART
(Access runtime) and JET.

If that still fails on a particular machine, loop through the References
collection, printing out the FullPath. Then check the location and file
version of these dll's on the problem system.
 

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