Problem with ALTER TABLE

Clive Beaton
Clive Beaton used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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 = ""
Clive BeatonAccess Developer

Author

Commented:
Perfect!  Thank you very much.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial