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

"Can't open a database created with a previous version"

Status
Not open for further replies.

rickgalty

Programmer
Nov 10, 2005
32
US
Hello, this is kind of a follow on to my previous thread about moving a project in development onto my laptop.

After ensuring that the Microsoft DAO 3.6 Object Library is properly referenced, I no longer get the "ActiveX component cannot create object" error - this was a critical error that stopped the application.

Now, instead, I get an error that says "Can't open a database created with a previous version of your application". This doesn't crash the app, but the requested form opens without an SQL connection available. In a couple of instances where I've used a bound data control to display a list, that list is populated, so the DB is fine - but SQL queries won't run - fields populated by a query are empty.

Any advice to fix this? It works fine on my desktop, just not on this laptop.

Richard
 
As a follow-up - the error appears three times as the form opens, and appears to be triggered by a recordset request. The code is....

Dim rs As DAO.Recordset
Dim rs1 As DAO.Recordset
Dim rs2 As DAO.Recordset
Dim db As DAO.Database
Dim n1 As Double
Set db = OpenDatabase(App.Path & "\Employees.mdb")
Set rs = db.OpenRecordset("Employees")
Set rs1 = db.OpenRecordset("Training")
Set rs2 = db.OpenRecordset("Records")

If I rem out the 'set rs = db.OpenRecordset...' lines, it opens with no errors (But also no functionality, of course) so the 'set db = OpenDatabase....' part seems to process ok.

Richard
 
You've got different versions of Microsoft Access on the two different machines. The only thing you can do to be able to open the database from both machines is to sync up the two versions. If you update the machine with the older version of Access to have the newer version you'll need to convert the DB to the newer version in Access before you try to open it with your app. If you remove Access from the machine that has the newer version and then install the older version of Access you don't have to do anything else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top