Results 1 to 5 of 5

Thread: Still unrecognized DB format

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    14
    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

  2. #2
    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

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Do you have references to BOTH DAO 3.51 AND DAO 3.6?

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    14

    wont allow me to

    it doesn't allow me to use both references only 3.6 or 3.51

  5. #5
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width