-
I put the code below in and it does the same thing(Unrecognized db format), do I change the code anywhere o0ther than the database path.
Option Explicit
Private daoDB36 As Database
Private rs As DAO.Recordset
Dim sPath As String
Private Sub Form_Load()
sPath = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set daoDB36 = DBEngine(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("Customers")
Set Data1.Recordset = rs
End Sub
-
Hi,
- Make sure that the database file is not corrupted. You do
this by opening it by MS Access.
- If it is a good database, then try the following:
Option Explicit
Private daoDB36 As Database
Dim rs As Recordset
Dim sPath As String
Private Sub Form_Load()
sPath = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set daoDB36 = DBEngine.WorkSpaces(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("Customers")
.
.
.
End Sub
regards,
Wesam
-
Do you have references to BOTH DAO 3.51 AND DAO 3.6?
-
wont allow me to
it doesn't allow me to use both references only 3.6 or 3.51
-
You are the first one to have a problem with this, and I've given the same MS support website to at least 20 people....and I've done it myself...it should work fine.....
If you want to send me your code, I would not mind taking a look
[email protected]