...

View Full Version : Adding a column to an Access Database



head8k
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

..head8k..

ecnarongi
08-07-2002, 06:15 PM
I believe that yesno has to be in brackets plus you need a slash like:

[yes/no]

head8k
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?

..head8k..

ecnarongi
08-08-2002, 09:55 PM
I don't have it right now but I will post later on today :D

ecnarongi
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.

head8k
08-09-2002, 06:03 PM
Thanks for trying ecn... I'm beginning to think this is impossible.

Anyone else?

omhoge
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

hth!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum