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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access97/2000 Mode

Status
Not open for further replies.

Utracman

Programmer
Mar 12, 2001
20
US
We have Access 97 and 2000 databases on a PC.

Is there a way to programically identify which mode the machine is currently in and switch to mode of mdb being opened?

Example - If I first use A2000 and then open an A97 .mdb I get an "unreconized format error" I then have to open Access97 which appears to switch the mode. Now the mdb will open as usual.

Thanks for the help.

Mr Utrac To learn fron those who have mastered the art..... Saves many headaches!
 
If you use shortcuts to open databases, right click the shortcut and use the following model for the 'target'

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\New Folder\Management\Management.mdb"

Locate the correct msaccess.exe for each database and they will open in the correct version.

Regards,

Dan
 
Thanks Dan.

That is one way to handle it, but I dealing with 80+ users and severals mdbs so I wanted to find a code solution that I can add to each app.

Not sure if there is another solution.

To learn fron those who have mastered the art..... Saves many headaches!
 
In theory...
You could use the Version property of a Database object.
Maybe opening a 'temporary' Access 2000 that would run some code like:

Sub testversion()
Dim mydb As Database
Set mydb = DBEngine.OpenDatabase("C:\My Documents\MyFile.mdb")
Debug.Print mydb.Version
'an If statement to locate the correct msaccess
mydb.Close
Set mydb = Nothing
Shell AccessPath & " " & "C:\My Documents\MyFile.mdb"
Quit
End Sub

Not tested and I really have to go now... Enjoy!

Dan
[smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top