Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    'method or data member not found' (Access 2003)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'method or data member not found' (Access 2003)

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

    Dim rst As DAO.Recordset

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: 'method or data member not found' (Access 2003)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'method or data member not found' (Access 2003)

    I'd have to see the database. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: 'method or data member not found' (Access 2003)

    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

Posting Permissions

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