Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADD a TRUE FALSE Field via ALTER TABLE

Status
Not open for further replies.

chris3366

Technical User
Mar 15, 2002
23
0
0
US
Hi All,

Any help will be appreciated.

I want to add a field to a MS Access 2013 (Using 2007-2010 Settings) database. I want to add a True/False field.

Field Name to be called DeleteRow.

This is what I have.

CurrentProject.Connection.Execute "ALTER TABLE BALBILL ADD COLUMN DeleteRow BOOLEAN);"

Getting a syntax error in data type (BOOLEAN)

I have tried adding the field as text and then alter the data type using this.

CurrentProject.Connection.Execute "ALTER TABLE BALBILL ALTER COLUMN DeleteRow BOOLEAN;"

I get error stating that it can't find the Field BOOLEAN in the table.

Thanks again for any help!

Chris
 
See if this works.

ALTER TABLE BALBILL ADD DeleteRow YESNO

Also, your YesNo field may not be formatted. This might not bother you, but if it does, you can use DAO to add a format.

HTH

Diana
VBA Princess
-- I'm hoping to grow up to be a Goddess!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top