View Full Version : Adding a column to an Access Database
08-07-2002, 05: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
08-07-2002, 06:15 PM
I believe that yesno has to be in brackets plus you need a slash like:
08-08-2002, 11: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?
08-08-2002, 09:55 PM
I don't have it right now but I will post later on today :D
08-09-2002, 04: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.
08-09-2002, 06:03 PM
Thanks for trying ecn... I'm beginning to think this is impossible.
10-16-2007, 05:54 PM
Hey seems you need to say it as one word yesno
this seemed to work
ALTER TABLE myTable ADD COLUMN isLocked YESNO
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.