Solved

Problem with ALTER TABLE

Posted on 2014-03-02
2
473 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
2 Comments
 
LVL 39

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now