Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move record

Status
Not open for further replies.

spalla

Technical User
Oct 10, 2004
12
0
0
CA
i have a database with 2 tables one for active clients and one for client that are not active anymore. How can i move one record from one table to the other if a certain field is set to "inactive"
i'd like to do that from a form
anybody can tell me how?
 
This is not a detailed answer but it is a starting point. you would need to create a update table query. search the record so it updates the table the make a delete query to delete it from the original table.

Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
 
could you be a bit more specific?
 
Something like this ?
DoCmd.RunSQL "INSERT INTO [inactive table] (field1,...,fieldN)" _
& " SELECT col1,...,colN FROM [active table]" _
& " WHERE [certain field]='inactive';"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top