Results 1 to 4 of 4
  1. #1
    ArvinFx is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2017
    Posts
    15

    modify a filed in a query

    Hi,



    I have a problem with modify a filed in a query "Datasheet view".

    Database is attached please find it.

    Problem is when I try to modify a value on occupation field, the data on table 2 will change and all fields will change ! ( you can test it by open query1 and change welder to anything else you will see all welders in any row will change!) I need to that change apply in a table1 only for specified row that I try to change the data.
    For example I change the Arvin Baba occupation to Singer and only arvin baba occupation change.
    Attached Files Attached Files

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Don't use a query to make these changes. Create a form bound to table1. On that form have a combo box that uses table2 and is bound to the "Job" field in table1
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    This is happening because you are changing the text for the field Occupation in Table2 instead if changing the Job field in table 1.

    Do this: edit Query1 and add the field Job from Tabel1. Execute the query.

    To change the "Arvin Baba" occupation to Singer and only "Arvin Baba" occupation changes, change the number in the Job field FROM 1 to 3.
    Move to a different record - this saves the change. Now look at the record for "Arvin Baba"... what is the occupation?

    You have created the tables/relationships correctly. Normally, you would use a form to edit the data.
    There would be a combo box bound to the "Job" field.

    BTW, "Name" is a reserved word and shouldn't be used as an object name.
    List of reserved words http://allenbrowne.com/AppIssueBadWord.html


    After you try the query above, look at the attached dB. Remember, only look after!!
    Attached Files Attached Files

  4. #4
    ArvinFx is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Feb 2017
    Posts
    15
    Yes, Thanks about your crystal clear explanation. It's ok now.

    Dear ssanfu my occupation is not fix , I can do so many things but I think i am not a professional at all.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 02-12-2016, 06:46 PM
  2. Replies: 3
    Last Post: 09-16-2014, 01:45 PM
  3. Modify a query
    By saray in forum Queries
    Replies: 2
    Last Post: 06-08-2013, 02:05 PM
  4. Query: Two tables With Yes/No Filed
    By Judasdac in forum Queries
    Replies: 6
    Last Post: 10-17-2011, 12:24 AM
  5. Replies: 2
    Last Post: 11-15-2010, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums