Recordset is not updateable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onyris
    New Member
    • Aug 2008
    • 42

    Recordset is not updateable

    Hi guys

    I have a little problem

    i have a small database with 2 formrs

    First form displays all the records and i also have a search button which allow the user to search for a specific record .
    When the search buton is clicked then a macro runs wich consists of running the query and displaying the second form with the records found .
    The only problem i have is that when the records are displayed i CAN''T modify the fields .
    On the macro sttings there is an option when the form is opened to be ( edit mode, addmode , read only mode) and it is set to edit mode but still doesn't allow to modify the fields.

    Thanks
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    Check out the query that the form is bound to. You'll probably find that too, is not updatable.

    Reasons for a Query to be Non-Updatable.

    Comment

    • onyris
      New Member
      • Aug 2008
      • 42

      #3
      Thnks for the Link .

      I didn't know that if i'm using a union query , then the records are not updateable.

      Is there any way around this to make it updateable.

      All i'm doing is basically to allow the user to serach for different fields on the same search , if u understand me . ( like i have one textbox to serach for and i want to be able to serach by first name , by city ..etc) .

      thanks

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        Originally posted by onyris
        Is there any way around this to make it updateable.
        It?

        What does this refer to? You haven't posted any SQL for a query.

        Comment

        • onyris
          New Member
          • Aug 2008
          • 42

          #5
          Sorry i forgot to put the query

          this is the query i'am using at the moment

          Code:
          SELECT *
          FROM [names]
          WHERE (((names.fisrt_name) Like "*" & [forms]![names_form]![txtname] & "*"));
          UNION SELECT *
          FROM [names]
          WHERE (((names.cemetery) Like "*" & [forms]![names_form]![txtname] & "*"));
          when i run the query , it returns the record set that i want , but i can display it on the form , but i can't modify it . .
          Last edited by Denburt; May 19 '09, 03:35 PM. Reason: Added code tags

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32661

            #6
            Ah, that makes more sense now.

            You need just a little work on the WHERE clause instead :
            Code:
            SELECT * 
            
            FROM [Names] 
            
            WHERE ([First_Name] Like '*' & [Forms]![Names_Form]![txtName] & '*') 
               OR ([Cemetery] Like '*' & [Forms]![Names_Form]![txtName] & '*')
            NB. I re-spelled your field name which was mis-spelled.

            Comment

            • onyris
              New Member
              • Aug 2008
              • 42

              #7
              Thanks a lot , is working now and i can edit the fields .

              Thanks again!!

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32661

                #8
                You're welcome & I'm very pleased to hear it :)

                Comment

                Working...