View Full Version : Adding a column to an Access Database
head8k
08-07-2002, 04:47 PM
Does anyone know the SQL statement needed to insert a yes/no tickbox column to a table in Access?
The statement below works but it doesn't make a tickbox, only a 1/0 (boolean) field for some reason.
ALTER TABLE table_name ADD COLUMN column_name YESNO
Thanks in advance
..head8k..
ecnarongi
08-07-2002, 05:15 PM
I believe that yesno has to be in brackets plus you need a slash like:
[yes/no]
head8k
08-08-2002, 10:37 AM
Thanks ecnarongi but it doesn't work.
I tried your code in the SQL editor in Access and it gives a syntax error:
ALTER TABLE table_name ADD COLUMN column_name [yes/no]
Do you have a working example you can post?
..head8k..
ecnarongi
08-08-2002, 08:55 PM
I don't have it right now but I will post later on today :D
ecnarongi
08-09-2002, 03:36 PM
I can't find it :( , you might have to hack this one. when I look for examples all I get is the -1/0 boolean thing. sorry I could not be of more assistance.
head8k
08-09-2002, 05:03 PM
Thanks for trying ecn... I'm beginning to think this is impossible.
Anyone else?
omhoge
10-16-2007, 04:54 PM
Hey seems you need to say it as one word yesno
this seemed to work
ALTER TABLE myTable ADD COLUMN isLocked YESNO
hth!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.