Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Move records between table with button

Discussion in 'Information Technology' started by Hassan Merzha, Jul 28, 2006.

  1. Hassan Merzha

    Hassan Merzha
    Expand Collapse
    Guest

    I have been asked at my job to come up with an answer to this question:

    we have a database that I designed that keeps track of basic inventory
    items, the db contains 5 tables for 5 different inventories but all of the
    tables contain the same columns.

    when an record is inputted into a certain table, is there a way to create a
    button on the form that will MOVE that specific record from any one of those
    tables and ADD it to a 6th table (the 6th table will already be created, but
    we want the item in question to moved when it's no longer needed in the
    inventory)

    I hope I've explained this well enough, I've tried working with the queries
    and macros but I've not come up with a viable solution yet. I'm not
    anywhere close to being very knowledgable about access but I can follow a
    step-by-step direction very well.

    any help is greatly appreciated.
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    You can move the item by executing an Append query to add it to the other
    table, and then a Delete query to remove it from the first.

    To ensure the Delete does not occur without the append, see this article:
    Archive: Move records to another table
    at:
    http://allenbrowne.com/ser-37.html

    You could make your job *much* easier by combining all these tables into
    one, with an extra field to identify whatever the difference was.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Hassan Merzha" <HassanMerzha@discussions.microsoft.com> wrote in message
    news:BB70A0AE-8746-4C98-8249-E5D7033765A2@microsoft.com...
    >I have been asked at my job to come up with an answer to this question:
    >
    > we have a database that I designed that keeps track of basic inventory
    > items, the db contains 5 tables for 5 different inventories but all of the
    > tables contain the same columns.
    >
    > when an record is inputted into a certain table, is there a way to create
    > a
    > button on the form that will MOVE that specific record from any one of
    > those
    > tables and ADD it to a 6th table (the 6th table will already be created,
    > but
    > we want the item in question to moved when it's no longer needed in the
    > inventory)
    >
    > I hope I've explained this well enough, I've tried working with the
    > queries
    > and macros but I've not come up with a viable solution yet. I'm not
    > anywhere close to being very knowledgable about access but I can follow a
    > step-by-step direction very well.
    >
    > any help is greatly appreciated.
    >
     

Share This Page