View Single Post
  #3  
Old May 10th, 2008, 06:31 AM posted to microsoft.public.access.forms
Jason[_25_]
external usenet poster
 
Posts: 126
Default Getting error with table update *Access*

No special text just the number 10. No special text in fieldname - just the
letters A to Z
What do you mean by Is the column you are trying to alter TEXT??
Text was on one line - OE craps entries made here

"Steve Sanford" limbim53 at yahoo dot com wrote in message
...
Jason,

I am using A2K/ WinXP

I used your SQL and I did not get an error. I changed the field from 50 to
10, then to 55, then to 35..... no errors.

Are you using any special chars in the table name or field name???
Is the column you are trying to alter TEXT??


Try changing your code to:

Dim sSQL as string

' this should be one line
sSQL = "ALTER TABLE [" & vTableName & "] ALTER COLUMN [" & vFieldName &
"] TEXT (" & vParameters & ")"

' find out what is in the string sSQL
Debug.Pring sSQL

db.Execute sSQL, dbFailOnError


Set a breakpoint on the "db.Execute" line and post back with the sSQL
results (from the immediate window)


HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


"Jason" wrote:

db.Execute "ALTER TABLE [" & vTableName & "] ALTER COLUMN [" &

vFieldName &
"] TEXT (" & vParameters & ")" 'change field size

where vParameters = 10
Gives Run-time error '3293'
Syntax error in ALTER TABLE statement

The field is created with field size =255 but not 10