Solved

Problem with ALTER TABLE

Posted on 2014-03-02
2
496 Views
Last Modified: 2014-03-02
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.
0
Comment
Question by:CRB1609
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 39898302
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
 

Author Closing Comment

by:CRB1609
ID: 39899380
Perfect!  Thank you very much.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question