PC Review


Reply
Thread Tools Rate Thread

Alter multiple columns types

 
 
Del
Guest
Posts: n/a
 
      9th Oct 2008
I need to change multiple columns from memo to text(30). The following code
works for a single column but i don't know how to add addition columns to the
code.

DoCmd.RunSQL "ALTER TABLE MyTable " & _
"ALTER COLUMN MyColumn1;"

--
Thank you,
Del
 
Reply With Quote
 
 
 
 
Jim Burke in Novi
Guest
Posts: n/a
 
      9th Oct 2008
I'm pretty sure you need a separate ALTER statement for each column you want
to change.

"Del" wrote:

> I need to change multiple columns from memo to text(30). The following code
> works for a single column but i don't know how to add addition columns to the
> code.
>
> DoCmd.RunSQL "ALTER TABLE MyTable " & _
> "ALTER COLUMN MyColumn1;"
>
> --
> Thank you,
> Del

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      9th Oct 2008
Del wrote:

>I need to change multiple columns from memo to text(30). The following code
>works for a single column but i don't know how to add addition columns to the
>code.
>
>DoCmd.RunSQL "ALTER TABLE MyTable " & _
>"ALTER COLUMN MyColumn1;"



You can inly mess with one column at a time. Use a separate
query for each column.

--
Marsh
MVP [MS Access]
 
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
Stacked columns width too thin - how can I alter? rafcoles Microsoft Excel Charting 1 10th Jan 2008 10:07 AM
Re: How to alter width of columns in Column Charts? Jon Peltier Microsoft Excel Charting 1 16th Jan 2007 01:00 AM
Alter regex to allow a url to span multiple lines. recoil@community.nospam Microsoft Dot NET Framework 1 9th Jun 2005 05:19 AM
Using Macro to Alter Multiple Pivot Tables =?Utf-8?B?SmFzcGVy?= Microsoft Excel Discussion 1 2nd Mar 2005 01:48 PM
Hide / alter columns Datagrid (Web Service & Dataset) =?Utf-8?B?QnJpYW4=?= Microsoft Dot NET Framework Forms 0 9th Feb 2004 07:06 PM


Features
 

Advertising
 

Newsgroups
 


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