error after updating from Access87 to 2000

K

KRosier

Hi folks!

I've inherited a database that I believe was originally created in
Access 97, possibly in 95. I updated it (clicked the "yes, please
update the database so I can use it in 2000" button) but now the modules
are hanging all at the same point.

Private Sub exit_Click()

On Error GoTo Err_exit_Click
DoCmd.Close

Exit_exit_Click:
Exit Sub

Err_exit_Click:
MsgBox Error$
Resume Exit_exit_Click


There are several routines like the one above. I get a "Compile Error:
Cannot find project or library" at the Error$

Has the syntax has been changed between versions or should I be looking
for something else?

Kathy
 
M

Marshall Barton

KRosier said:
I've inherited a database that I believe was originally created in
Access 97, possibly in 95. I updated it (clicked the "yes, please
update the database so I can use it in 2000" button) but now the modules
are hanging all at the same point.

Private Sub exit_Click()

On Error GoTo Err_exit_Click
DoCmd.Close

Exit_exit_Click:
Exit Sub

Err_exit_Click:
MsgBox Error$
Resume Exit_exit_Click


There are several routines like the one above. I get a "Compile Error:
Cannot find project or library" at the Error$

Has the syntax has been changed between versions or should I be looking
for something else?


My memory is a little fuzzy that far back, but I think that
was an A2 syntax that was replaced in A95 or A97 (even if it
still worked).

The "new" way is to use the Err object.

MsgBox Err.Number & " - " & Err.Description
 
K

KRosier

Thanks Marshall!

I was afraid of that. The thing wasn't in the best shape when I got it.
The tables were obviously not normalized, but it apparently worked
for the users. I should learn not to say "Oh, I can fix that!" before I
get a good look at it.

Kathy
 
M

Marshall Barton

It's not too difficult to use Replace (VBA Edit menu) to
change all the Error$ to Err.Description or whatever's
appropriate. Just be careful that a procedure is not using
a variable named Error or Error$
 
K

KRosier

Thanks Marsh!

Now, on to find the rest of the code that has changed between then and
now. I'll most likely be back with more questions.

Does anyone know of a document or website that shows the "changes in
syntax" between each version of Access? It sure would save me asking a
million questions and pestering you all here ;-)

Kathy
 
M

Marshall Barton

Each version's Help file usually(?) explains the code
impacting features that it introduces. However, there have
been very, very few of them since A95 cleaned up a lot of
stuff from A2 and shifted from Access Basic to VBA.

Most of the old A2 stuff still worked for several more
versions, but some of them have been slowly dropped over the
last 10 years.

I doubt that you will find very many problems of this nature
and suggest that you just compile the application to find
syntax and name changes. Then, as with every other kind of
change to your application, run a lot of tests to see what
works and what needs further fixing.
 
K

KRosier

Aha!

After rooting around a bit more I discovered that the DAO library had to
be changed to the Microsoft DAO 3.6 Object Library. After I did that,
nearly everything worked. Just a few calculations that didn't take into
account that being Null would screw them up. Fixed those and the old
database should work well enough until I manage to get the new one up
and running.

Thank you, once again for your help and patience. I really appreciate it!

Kathy
 

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