ALTER COLUMN syntax

P

Paul3rd

Hello, I'm trying to change the property of a table column on a remote server
using the following code:
Private Sub Command95_Click()
DoCmd.SetWarnings False

Dim MySQL3 As String
MySQL3 = "ALTER TABLE tbl52ApptDis ALTER COLUMN [Row] DATE/TIME
(ShortDate);"
DoCmd.RunSQL MySQL3

DoCmd.SetWarnings True
End Sub
The table name is tbl52ApptDis and the column [Row] is currently a text
field I'd like to change to a Date/Time field (Short Date).
The code returns "Error # 3293, Syntax error in statement". I can't seem to
find the correct syntax. Can anyone offer a solution?
Thanks in advance for any help.
Paul
 
R

RoyVidar

Paul3rd said:
Hello, I'm trying to change the property of a table column on a
remote server using the following code:
Private Sub Command95_Click()
DoCmd.SetWarnings False

Dim MySQL3 As String
MySQL3 = "ALTER TABLE tbl52ApptDis ALTER COLUMN [Row] DATE/TIME
(ShortDate);"
DoCmd.RunSQL MySQL3

DoCmd.SetWarnings True
End Sub
The table name is tbl52ApptDis and the column [Row] is currently a
text field I'd like to change to a Date/Time field (Short Date).
The code returns "Error # 3293, Syntax error in statement". I can't
seem to find the correct syntax. Can anyone offer a solution?
Thanks in advance for any help.
Paul

Try with only

"ALTER TABLE tbl52ApptDis ALTER COLUMN [Row] DATETIME"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top