Problem with ALTER TABLE

I have 2 lines of code.  The first line works but the second line causes an error 3293 Syntax error in ALTER TABLE statement.  Can anyone tell me why?

   dbs.Execute "ALTER TABLE tblSlsDocHdrs ALTER COLUMN Debit Currency"
   dbs.Execute "ALTER TABLE tblSlsDocHdrs ALTER COLUMN Debit DROP DEFAULT"

Thanks in advance.
CRB1609Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
als315Connect With a Mentor Commented:
Access SQL version doesn't allow set/drop such properties as Default value or Validation Rule. Possible DROP commands you can find here:
http://msdn.microsoft.com/en-us/library/office/bb177897(v=office.12).aspx
 You should use tabledefs for these properties:
CurrentDb.TableDefs("tblSlsDocHdrs").Fields("Debit").DefaultValue = ""
0
 
CRB1609Author Commented:
Perfect!  Thank you very much.
0
All Courses

From novice to tech pro — start learning today.