Program from access 97 won't work in access 2000 
Author Message
 Program from access 97 won't work in access 2000

When I updated my computer from access 97 to access 2000 a
program written in VBA, that someone else wrote many years
ago, will not work in access 2000. When I run the de{*filter*}
several different problems come up, like "GoToControl" is
no longer available.  I am not a programmer so I do not
understand what the problem is.  Any ideas?  

James Patterson



Tue, 22 Jun 2004 11:15:26 GMT  
 Program from access 97 won't work in access 2000
GoToControl can be replace by:
   Me.txtMyControl.SetFocus
I suggest you go into any module and menu select Debug|Compile...
This should find most of your problems.

Duane


Quote:
> When I updated my computer from access 97 to access 2000 a
> program written in VBA, that someone else wrote many years
> ago, will not work in access 2000. When I run the de{*filter*}
> several different problems come up, like "GoToControl" is
> no longer available.  I am not a programmer so I do not
> understand what the problem is.  Any ideas?

> James Patterson



Tue, 22 Jun 2004 12:07:38 GMT  
 Program from access 97 won't work in access 2000
GoToControl works in Access 2000 the same as it did in Access 97.

Did you get any error messages when you converted the app? For example, an
error message saying that 'the VBA project may be corrupted?' If so, on
every occasion except one that I experienced that problem, I was able to
solve it by decompiling and then recompiling in Access 97 and then
reconverting to Access 2000. On the one occasion that didn't work, I was
able to import the objects from the Access 97 MDB into a new, empty Access
2000 MDB.

Some of what follows may be difficult for a non-programmer to follow, but
I'll explain it as best I can, so you can decide whether you want to try it
yourself or find someone with Access development experience to help.

First, make a copy of the Access 97 MDB, and try all of this on the *copy*,
just in case.

To decompile in Access 97 (if you no longer have Access 97, you'll need to
copy the Access 97 version of your application to a PC that still has it)
start Access from the Start menu 'Run' dialog with the following command
line:

"full path to msaccess.exe" /decompile "full path to MDB"

For example, on my system, where Access 2000 is installed in a 'V09'
subfolder off the 'Microsoft Office' folder:

"C:\Program Files\Microsoft Office\V09\Office\MSACCESS.EXE" /decompile
"C:\My Documents\SomeFile.MDB"

Note the placing of the quotes - they're necessary if there are spaces in
the path, but the /decompile is outside the quotes.

When you've decompiled, open any module and choose 'Compile and Save All
Modules' from the 'Debug' menu.

You say this program was written 'many years ago'. Is it possible that it
was originally written in Access 2, and later converted to Access 97? If so,
it may still include a reference to the DAO 2.x/3.x Compatibility Library.
(Open any module and choose 'References' from the 'Tools' menu to see what
references are checked.) In that case, still in Access 97, you will need to
remove that reference and replace it with the DAO 3.51 (or DAO 3.50, if you
don't see 3.51 listed) Object Library, then select 'Compile and Save All
Modules' from the 'Debug' menu. Attempting to compile will highlight any old
DAO 2.x code that needs to be modified. These include:

BeginTrans, CommitTrans and Rollback are now methods of the Workspace
object, not the Database object.

RecordsetName.FieldName (eg rst.SomeField) needs to change to
RecordsetName!FieldName (eg rst!SomeField).

I'm a big hazy on this next one, as it didn't occur very often in the apps I
converted, but the old DAO 2 syntax for assigning a QueryDef changed too. I
*think* the old syntax went something like 'Set qdf =
db.OpenQueryDef("QueryName")' - I may not have that exactly right, but
attempting to decompile will highlight any QueryDef assignments that need to
change. The new syntax is 'Set qdf = db.QueryDefs("QueryName").

--

Brendan Reynolds


Quote:
> When I updated my computer from access 97 to access 2000 a
> program written in VBA, that someone else wrote many years
> ago, will not work in access 2000. When I run the de{*filter*}
> several different problems come up, like "GoToControl" is
> no longer available.  I am not a programmer so I do not
> understand what the problem is.  Any ideas?

> James Patterson



Tue, 22 Jun 2004 20:08:46 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. An access 95 program doesn't work on access 2000

2. Correlated subquery in DELETE stmt not work in Access '97 or 2000

3. DLL usage - works in Access 97 but not in Access 2000

4. Link Failure in Access 2000 that works in Access 97

5. Getting back the formatted MsgBox in Access 2000 that worked in Access 97

6. Access 2000 can't read from a referenced table - but could in Access 97

7. Excel Macro from Office 97 won't work in 2000

8. Access 97 upgrade to Access 2000 or Access 2002

9. Application written for Access 2000 with DAO won't run in Access 2002

10. Win/Off 2000 and Access 97 Runtime

11. How to get Access 97 (built on a Windows 2000) to work on 95s and 98s

12. Best method of working with Access 97 / Outlook 2000 / Exchange Server 5.5

 

 
Powered by phpBB® Forum Software