View Full Version : update statment using checkboxes

11-25-2003, 01:08 PM
Hi All,
I have a query that has been perplexing me for a while.
When I write an update command, in the SQL I encase the runtime variable for
a text field in inverted commas ('), date with (#)... But how do you update

UPDATE textField = 'varText', numberField = varNumber Where (what ever) But what about checkbox (yes/no) fields?

Please can someone enlighten me?


11-25-2003, 02:39 PM
I've found the solution for those who wish to know:

In Access you would use 0 for false and -1 for true.
In SQL Server you would use 0 for false and 1 for true.

11-25-2003, 02:41 PM
I normally don't even bother using checkboxes - just have a number field where I enter 0 for false and 1 for true.

Probably not the proper way to do it, but it does make things easy :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum