SQL Update Syntax

Would like to update all the values  in a table (tOffice) to False (-1) for the field name "Courier"

I've tried some variations of this SQL command without luck

DoCmd.RunSQL "UPDATE toffice SET Courier  =  -1

Courier is a yes/no variable.

What is wrong with my syntax?  Should I be using an SQL update for this?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> Courier is a yes/no variable.

If that is the case, then valid values are 1 for YES and 0 for NO.
Kindly change the value to 0 to get it work..
UPDATE toffice SET Courier  =  0

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NorieAnalyst Assistant Commented:
-1 is actually the equivalent of Yes/True.

If you want to set the Courier field to No/False use 0.
DoCmd.RunSQL "UPDATE toffice SET Courier  =  0"

Open in new window

thandelAuthor Commented:
NorieAnalyst Assistant Commented:
No problem, by the way you can actually use No/False.
DoCmd.RunSQL "UPDATE toffice SET Courier  =  No"

Open in new window

DoCmd.RunSQL "UPDATE toffice SET Courier  =  False"

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.