Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Posts
    59

    Unanswered: Run-time error '-2147352567 (80020009)': This Recordset is not updateable.

    I am currently getting this error message when opening a form from a DblClick function on another form.

    This is the code that I am using:

    Code:
    Private Sub Completed_DblClick(Cancel As Integer)
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frmSurveyResponses"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
        
        Me.SrvID = Forms!frmSurveyResponses!SrvID
    
    End Sub
    frmSurveyResponses has set as it's RecordSource a SELECT DISTINCTROW query with data from 2 tables. These 2 tables are linked by a One-to-Many join on the SrvID field.

    The field which I want the SrvID data included in has SrvID as its control source and it's name is cboSrvID. Hence, I have also tried this in my code:

    Code:
    Me.SrvID = Forms!frmSurveyResponses.Controls!cboSrvID
    But get the same error message.

    Does anyone know what could be the cause of this? Is it because of the relationship at the heart of the form that the recordset is not updateable? Are there any variables I can change which might make it updateable?

    Thanks!
    Russ

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Forget the code. Can you TYPE the ID into your Me.SrvID field?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2008
    Posts
    59
    Yep, there's no problems whatsoever typing the ID straight into the field. And by doing it manually there is no problem whatsoever. It's just when I'm opening the form from another that I get this error message, but I really need for this to work as part of the database.

    Do you have any other suggestions?

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Well it beats me.

    Can you change the code to Me.SrvID = 7 or some other hard coded value? I don't think it's the code that's the problem tbh, the code looks fine. I have a suspicion it's the SQL of the form or a data type problem, but yeah, I don't think the code you have posted is the culprit.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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