Append/Update in one query

mshoems

Registered User.
Local time
Today, 10:00
Joined
Dec 15, 2009
Messages
12
I have an issue where a user needs to copy a record from one table to another. I can successfully do this using an append query but I also need to update two check boxes when the copy occurs. Is this an option with one query?
 
INSERT INTO YourTOTable ( FirstName, LastName, CB1, CB2 )
SELECT YourFromTable.FirstName, YourFromTable.LastName, True, True
FROM YourFromTable;

Note the True True is "hardcoded" in the select
 
You are awesome dcb. So far it is working. I am going to test a little more just to ease my mind before I throw it out for others to use. I initially tried what you suggested but of course I didn't have something correct.
Thanks.
 
You prob tried Yes or "True" - access uses the keyword True as Boolean
havent tested but think you could use -1
 
I was using Yes and No as the values I was trying to update instead of True and False. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom