firstly,
to alter a column in a table execute the following (using access' SQL query
type set to Data Definition)
alter table [tbname]
alter column [tfield] text(255)
this extends (or truncates) the tfield to 255
Secondly,
try changing the boolean (SQL) type to the dumbed down access type (yesno)
CREATE TABLE [tbName] (field1 text(50), field2 yesno)
hope this helps
al.
"KevinEvans" <kevinevans.TakeThisOut@aol.com> wrote in message
news:20040512151212.28864.00001268@mb-m05.aol.com...
> I have an application 'out there' and now need to alter some tables in my
> client's Access database. I can easily add (create) tables, alter tables
(add
> and remove fields) and drop tables all in code. However I would also like
to
> extend the length of an existing text field from 100 to the maximum 255
> characters in a table. Can this be done in code? Any help/advice greatly
> appreciated.
>
> Second question (not so important): When I am creating a table in code I'm
> having a problem adding a Boolean field. What is wrong with:
>
> CREATE TABLE [tbName] (field1 text(50), field2 boolean)
>
> Kevin Evans
> KLE<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Altering tables in an existing database