Recordset read only problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lirsy
    New Member
    • Jan 2017
    • 6

    Recordset read only problem

    Hi all!!

    I would greatly apreciate any help in this!!

    I have problems with a recordset (it says that it is read only and I need to modify some of its values) and then I tried to create the simpliest version to see where is the problem. I keep having the same problem.

    The simplest version is just:

    Dim Rs2 As DAO.Recordset
    Sql_Str = "SELECT 0 As Id, '' As Cod, 0 As IdOff, 0 as QToT, 0 as Pro, 0 As TotCost"
    Set Rs2 = DBsa.OpenRecord set(Sql_Str, dbOpenDynaset)

    When I try to modify any value in any field in any record in Rs2 ... it keeps saying that it is read-only.

    Any idea about what happens and how to solve the problem??

    Thanks a lot for your help!!!
  • PhilOfWalton
    Recognized Expert Top Contributor
    • Mar 2016
    • 1430

    #2
    The Obvious thing is that no table is defined.

    Try building a straightforward query using the QBE grid, then copy it's SQL into your VBA project.

    Phil

    Comment

    • Lirsy
      New Member
      • Jan 2017
      • 6

      #3
      Ep!!!!

      So evident!! :-(

      You can't update anything you don't have!!! :-(

      Thanks a lot!!!

      Comment

      Working...