Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Mar 2004
    White Oak, Pennsylvania, USA
    Thanked 0 Times in 0 Posts

    Index in Access 2003 (2003)

    I just upgraded to Access 20003 - Office 11 and any code that references an index on a table:
    Names.index = "PrimryKey"
    generates an error message that indicates the index property is not a valid property for the type of object - Names is defined as a Recordset.

    Is there some reference I have to add in the Tools section of VB for Access to make XP version code (DAO) work in 2003?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Index in Access 2003 (2003)

    1) Select Tools | References in the Visual Basic Editor.
    Make sure that the reference to Microsoft DAO 3.6 Object Library is set (check box ticked).
    Unless you need ADO, clear the check box for Microsoft ActiveX Data Objects m.n Library (m and n may vary)

    2) If you want to be really consistent, search through the code for declarations of the form

    Dim ... As Recordset

    and change them to

    Dim ... As DAO.Recordset

    Similarly, change As Field to As DAO.Field

Posting Permissions

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