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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATE TABLE test Yes/No column

Status
Not open for further replies.

TWillard

Programmer
Apr 26, 2001
263
US
I would like to create a table in access via a sql ddl statement. The sql will be executed from a SQL Server DTS package. I have it working provided that I use varchar column types. The varchar matches to access's Text. But I am not sure how to specifiy an Access Yes/No data type for access. Please help!

CREATE TABLE `SAMPLE` (
`ID` VarChar (15) NULL,
`FLAG` YES/NO NULL
)

 
BOOLEAN ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV - Thanks for the response. It did not work.

Howerver, the following syntax does create a the column with a yes/no data type.

CREATE TABLE `SAMPLE` (
`ID` VarChar (15) NULL,
`FLAG` YesNo NULL
)

Cool! But I would still like to set the formatting to Yes/No. On use of this statement, the formatting is not set in access and therefore it defaults to '0' and '1' values. Any ideas?
 
Code:
CurrentDb.TableDefs("Sample").Fields("Flag").Format="Yes/No"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top