PC Review


Reply
Thread Tools Rate Thread

ALTER Table Add Column...y/n?

 
 
=?Utf-8?B?bnljZG9u?=
Guest
Posts: n/a
 
      10th Jul 2007

how do I add y/n column in A2003 with ddl/vba? I tried datatype of BIT, but
shows as 0/-1, whereas other y/n columns defined in designer show as checkbox
(datasheet view) . Would like to have these look same..

db.Execute "ALTER TABLE [Expense] ADD COLUMN [Reviewed] BIT"
 
Reply With Quote
 
 
 
 
Peter Hibbs
Guest
Posts: n/a
 
      10th Jul 2007
Have a look at
http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='BE%20Update%20Utility.mdb'
which may help.

Peter Hibbs.

On Tue, 10 Jul 2007 11:18:01 -0700, nycdon
<(E-Mail Removed)> wrote:

>
>how do I add y/n column in A2003 with ddl/vba? I tried datatype of BIT, but
>shows as 0/-1, whereas other y/n columns defined in designer show as checkbox
>(datasheet view) . Would like to have these look same..
>
>db.Execute "ALTER TABLE [Expense] ADD COLUMN [Reviewed] BIT"

 
Reply With Quote
 
Chris2
Guest
Posts: n/a
 
      10th Jul 2007

"nycdon" <(E-Mail Removed)> wrote in message
news:1A4FA203-6E78-48C6-859B-(E-Mail Removed)...
>
> how do I add y/n column in A2003 with ddl/vba? I tried datatype of BIT, but
> shows as 0/-1, whereas other y/n columns defined in designer show as checkbox
> (datasheet view) . Would like to have these look same..
>
> db.Execute "ALTER TABLE [Expense] ADD COLUMN [Reviewed] BIT"


nycdon,

It is doing exactly what it should be doing. All BIT datatype columns store 0 or -1.

When you use a datasheet view of a table, it may have been set to show Yes/No, or a
check-box, but that is not the information that is being stored.

You may need to go into your table in Design View, select the column name's row, look down
to the General Tab, and in the Format field write in "Yes/No". Switch to the Lookup Tab
and make sure Display Control is set to Text Box.


Sincerely,

Chris O.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alter Table/Column to RTF Robin Microsoft Access 6 11th Aug 2008 12:14 AM
Question about ALTER TABLE and ALTER COLUMN BobV Microsoft Access VBA Modules 7 20th Sep 2006 02:06 PM
RE: ALTER TABLE ADD COLUMN Eric Butts [MSFT] Microsoft Access Database Table Design 0 22nd Sep 2004 08:34 PM
Alter Table Add Column Nathan Carroll Microsoft ADO .NET 5 20th Aug 2004 01:53 PM
alter table, create table, drop column John Microsoft Access 1 7th Oct 2003 05:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:03 AM.