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

Unrecognized database format

Status
Not open for further replies.

WynneSMI

Programmer
Dec 16, 2002
76
US
Now that I have converted my Access DB from 97 to 2000, I have run into yet another problem. It opens up and runs fine until certain VBA code is executed. It gives me this error, "Unrecognized database format C:\DB\Test\Data2000.mdb)", when it trys to execute this line of code,
Set mydb = OpenDatabase("C:\DB\Test\Data2000.mdb"). Does anyone have any ideas??? Thanks.
 
Go to the command prompt and type in MSACCESS /decompile

When access starts up, open your database up (the one you converted) and give that a go.

;-)
 
[tt]
Hi:

It's a topic I don't know much about, but I think you have to use DDE (enabled in Tools, Options, Advanced).

Also, there's a long article in A2K "Help", under "OpenDatabase".

In my Access2000, I don't find a macro command for OpenDatabase.

But I would try:

Dim mydb As Database
Set mydb = "C:\DB\Test\Data2000.mdb"


or else, if that doesn't work, use brackets:

Set mydb = "[C:\DB\Test\Data2000.mdb]"


Just some random thoughts from an idle fellow.

Cheers,

[glasses][tt] Gus Brunston - Access2000(DAO)[/tt] Intermediate skills.
 
Wayne:

It could be a reference issue if you are using old '97 code.

Check your references for DAO 3.5 or 3.6.

Also, you may need to explicity identify DAO or ADO when you Dim Mydb -- Dim Mydb as DAO Database. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top