• ‘method or data member not found’ (Access 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » ‘method or data member not found’ (Access 2003)

    Author
    Topic
    #454536

    I keep getting the above error message on the “rst.MoveFirst” line of code below.

    Set db = CurrentDb
    strSQL = “SELECT JOB ” & _
    “FROM tmpOneJobOnePayDay ” & _
    “GROUP BY JOB;”

    Set rst = db.OpenRecordset(strSQL, dbOpenDynaset)
    rst.MoveFirst

    I have tried compacting and repairing. I have tried Decompiling. I have tried creating a new database and importing the tables, I have checked my References, and yet I cannot understand why. I know ih the past I have been able to open a recordset and move through it, but now I can’t.

    Where should I look next?

    Thanks in advance for your assistance.
    Ken

    Viewing 0 reply threads
    Author
    Replies
    • #1128582

      Make sure that rst is explicitly declared as a DAO recordset:

      Dim rst As DAO.Recordset

      • #1128584

        Hans,

        Thanks for getting back so quickly. I didn’t copy the Dim section, but it is declared exactly as you posted, as is the “dim db as dao.database”.

        I have tried on two different machines with same results.

        Thanks.

        Ken

        • #1128585

          I’d have to see the database. Could you post a stripped down copy of your database? See post 401925 for instructions.

          • #1128592

            Hans,

            This is the most unusual situation. I made a copy of the database, removed a graphic from the form to make the file as small as possible. Then before zipping it, I tried compiling it and it compiled!

            So I don’t know what’s up with that.

            THANKS!

            Ken

    Viewing 0 reply threads
    Reply To: ‘method or data member not found’ (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: