Results 1 to 3 of 3

Thread: DataCombo, ListField

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Location
    Preddvor, SI, Slovenia
    Posts
    18

    Smile

    Hi
    I'm making for the first time an application, where i would like to use database, but I have a lot of problems.
    First problem is, that when I write this:

    Dim DB As Database
    Dim RS As Recordset

    Private Sub Form_Load()
    Set DB = OpenDatabase(App.Path & "\generali.mdb")
    Set RS = DB.OpenRecordset("Generali")
    End Sub

    I run the application, but there is a note saying "Type mismatch" and the line "Set RS = DB.OpenRecordset("Generali")" becomes yellow. What's wrong?

    I would like also that DataCombo would display in a list the first field from a database.
    Thanks.

    Jure

  2. #2
    Junior Member
    Join Date
    Jun 2000
    Posts
    29
    Dim DB As Database
    Dim RS As Recordset

    Private Sub Form_Load()
    Set DB = OpenDatabase(App.Path & "\generali.mdb")
    Set RS = DB.OpenRecordset("Generali")
    End Sub

    Try changing the (App.Path & "\generali.mdb") to (App.Path & "/generali.mdb")and just make sure the recordset is correct

    Let me know what happens!
    Altecjjf

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 1999
    Location
    Preddvor, SI, Slovenia
    Posts
    18

    Thumbs up Answer

    From MSDN Library:

    If your project contains references to both the Data Access Objects (DAO) library and the ActiveX Data Objects (ADO) library, you may see multiple Recordset entries in the list box when you dimension the Recordset object. This error occurs when you list the ADO library with a higher priority than the DAO library in the References dialog box, regardless of which Recordset entry you select from the list box.

    If you need only the DAO Recordset object, make sure that the reference for the DAO object library has a higher priority in the References dialog box, or clear the reference to Microsoft ActiveX Data Objects.
    _______________________

    And now it's working.

    Jure

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