Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

losing code in XP?

Status
Not open for further replies.

taylornow

Technical User
Oct 16, 2000
90
US
Hello everybody-
We are converting all oour computers to XP. The word is that all the coding we have done in 97 will be lost. True or not true? If it is - does anyone know the fix ?

Thanks in advance
Taylor
 
NOT TRUE! However, let's get a couple thing straight. Are you converting to Windows XP or to Access XP (Access 2002)?

If you are converting to Windows XP you can still have Access 97 on your computer and use a desktop shortcut to point to the MSACCESS.EXE file for Access 97. If you are converting to Access XP then you can still have Access 97 on your computer and do the same as listed above. If you are converting to Access XP (2002) and will no longer have Access 97 on your computer here are a number of cautions. If you don't need to modify the design you can open the Access 97 database in Access XP and chose not to convert. However, I would strongly recommend you convert. The process of converting can be anything from very simple to a full rewrite if you want to convert DAO code to ADO.

If you have no VBA code it is extremely simple. Merely accept the dialog to convert the code.

If you have VBA code that is strongly tied to older code and DAO then it would be more difficult but still not too much of a problem. One thing to remember, the default database access technology for for Access 97 is Data Access Objects (DAO) and the default technology for Access 2000 in ActiveX Data Objects (ADO). ADO essentially replaces DAO in Access 2000 in the default case.

Sooo... a statement like 'Dim rst As Recordset' will use different technologies and methods between Access 97 and Access 2000. But you only need to make a global replacement to keep from having to rewrite the code,

Look for: As Recordset Replace With: As DAO.Recordset
Look for: As Database Replace With: As DAO.Database
Look for: As Field Replace With: As DAO.Field

And of course some other objects that are DAO objects only.


----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top