Results 1 to 11 of 11
  1. #1
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171

    how to transfer record of one table to another

    Hello,

    I have two tables "Location" and "Orders"
    fields in "Location" table are:
    Locid , Location , Deptid

    fields in "Orders" are:
    Orderid , Locid , Deptid

    Now I want to link fields of table "Orders" with table "Location"
    So whenever I enter data in table "Location" it automatically update to table "Orders".
    I tried to use Append quarry but the problem is append quarry update all record.
    But I want that every time I put new record in table "Location" only that record should update to table "Orders".

    Hoping you understand my problem.


    Thanks

  2. #2
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    you can use the append query itself in a different way,

    append into target where coloumn not in (select coloumn from source)

  3. #3
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    By update "all records" I mean that if every time I click append query all previous records of table "Location" will be append to table "Orders" in that targeted columns.
    which I don't want.
    I want that every time I enter a new Location and Department in table "Location" only that record to append table "Orders".
    and all previous records should not copy.

  4. #4
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    Read my first reply in complete and you will understand clearly

    OR

    Just paste the append query that ur talking about I will try and make necessary changes

  5. #5
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    This is a test db you check and make changes.

  6. #6
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    Below is the query:

    INSERT INTO Orders ( Locid, Deptid )
    SELECT Location.Locid, Location.Deptid
    FROM Location where location.locid not in (select locid from orders)

    reply if it worked

  7. #7
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Well done.
    It working nice.
    I clicked the star below your post for reputation.
    I just want to know for info that if I want to create this criteria in sample query (not in SQL).
    then what criteria will be used there?

  8. #8
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    I just want to know for info that if I want to create this criteria in sample query (not in SQL).
    then what criteria will be used there?[/QUOTE]



    Can you explain what exactly you mean by that

  9. #9
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Quote Originally Posted by msoffice.vidyarthi View Post
    I just want to know for info that if I want to create this criteria in sample query (not in SQL).
    then what criteria will be used there?


    If I use this query type which I shown in image then what criteria will be use there?

  10. #10
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    Not In (select locid from orders)

  11. #11
    glen is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    171
    Tested.
    worked.
    Problem Solved.
    Thanks.

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

Similar Threads

  1. Replies: 12
    Last Post: 09-13-2012, 12:07 PM
  2. Replies: 2
    Last Post: 11-02-2011, 08:31 AM
  3. Replies: 1
    Last Post: 09-27-2011, 09:42 PM
  4. Transfer data from ListView to Table
    By Zyckie in forum Access
    Replies: 1
    Last Post: 12-15-2009, 11:23 AM
  5. Replies: 3
    Last Post: 04-23-2006, 09:09 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