Question

Locked

Move record from one table to another

By acracker ·
Hi, I am making a database that involves three different tables, I'll call them PRIMARY, RETURNED and MISSING. Right now I have it set up so that a combo box will search the PRIMARY table based upon last name and then show the ID, lastname, and firstname of the person on the form. I need to make a couple of buttons or something that will take the entire record from the PRIMARY table and move it to the RETURNED or MISSING table depending on which button is pressed. I want the data to be moved, not copied so that it will no longer exist in the PRIMARY table, only in the MISSING or RETURNED table that it got moved to. I just started working with MS Access and I don't know any VBA, so please excuse my ignorance. Thanks for any help you can give me.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

SQL will do it

by Tony Hopkinson In reply to Move record from one tabl ...

Insert into returned
select * from [Primary] Where ID = ?

Not a good idea to use key words (PRIMARY) as your entity names.

Collapse -

Clarification

by acracker In reply to SQL will do it

I'm sorry, but I'm not sure I follow you. Where do I go to perform this action and how do I do it? Thanks.

Collapse -

Hmm

by Tony Hopkinson In reply to Clarification

I'ma bit rusty on access, but if you had a returned button, you could make the action to run a query and supply the id parameter on the form.

I'm sure there's a way to put this query in the designer (append query ?), but I always found it easier to use the sql view on the query page and type the raw SQl in.

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums