Upgrading an MDB from Acc 95 to 2000

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

A customer has given me a database with a lot of VB code which needs to be
converted from Acc 95 to 2000. Everything has worked fine but for one
glitch: the programmer used a period, '.' , rather than an explamation
point between the recordset name and the field name. For example:

'myRS.ConsolidationLevel3id' instead of 'myRS!ConsolidationLevel3id'.

Apparently this was legal in Acc 95.

So, this app will not compile. There is a lot of code here, so there could
be 100's or 1000's of this situation.

Is there any way to do a mass conversion? I can do it one at a time by
compiling, but am hoping for something better. I also think all references
to form objects are separated by '!', as in Me!txtBox.

Many thanks,
Mike Thomas
 
Mike,

myRS.ConsolidationLevel3id is still valid in A2K (and later), so maybe
your problem is a different one. Before setting out to make all those
changes, have you checked your references? For instance, if these are
DAO recordsets (if memory helps ADO wasn't around in the A95 days), have
you checked that you have the proper DAO reference (3.6) in your
converted A2K database? Also, can you successfully use DAO in another
A2K database, so you know your DAO360.DLL is there is is OK?

PS: Me!txtBox is also OK.

HTH,
Nikos
 
For the references to form controls, either dot (".") or bang ("!") are OK.
For the references to fields in recordsets, though, you need to change the
dot to a bang. Unfortunately, you can't do a simple find and replace,
because the dot is still used for properties of a recordset. In other words,
rst.EOF is correct, and should not be changed to rst!EOF, but
rst.SomeFieldName is incorrect, and needs to be changed to
rst!SomeFieldName - or rst("SomeFieldName") or rst.Fields("SomeFieldName").

The use of the dot syntax to reference a field in a recordset was already
obsolete in DAO 3.0 (the version of Jet used by Access 95) but it was
possible to continue to use the old DAO 2.x syntax by using the DAO 2.x/3.0
or DAO 2.x/3.5 Compatibility Library. However, there is no compatibility
library for DAO 3.6 (the version used by Access 2000 and later, so you will
need to convert the obsolete code.

Sorry, I'm afraid there is no shortcut that I know of.
 

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

Back
Top