A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need to Alter Required property to No in SQL



 
 
Thread Tools Display Modes
  #1  
Old November 15th, 2005, 08:25 AM
Reanie
external usenet poster
 
Posts: n/a
Default Need to Alter Required property to No in SQL

I need to write a single SQL statement to alter the Required property of a
Long Integer Table Field (Column) from Yes to No.

I know how to do it in VBA, but this isn't an option in this case.

Thanx

Reanie
  #2  
Old November 15th, 2005, 12:08 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default Need to Alter Required property to No in SQL

Try altering the column like this:
strSQL = "ALTER TABLE MyTable ALTER COLUMN Choice LONG NOT NULL;"
CurrentProject.Connection.Execute strSQL

I doubt that query will execute through the query interface, since Access
natively uses DAO.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Reanie" wrote in message
...
I need to write a single SQL statement to alter the Required property of a
Long Integer Table Field (Column) from Yes to No.

I know how to do it in VBA, but this isn't an option in this case.

Thanx

Reanie



  #3  
Old November 16th, 2005, 05:21 AM
Reanie
external usenet poster
 
Posts: n/a
Default Need to Alter Required property to No in SQL

Thank you.

"Allen Browne" wrote:

Try altering the column like this:
strSQL = "ALTER TABLE MyTable ALTER COLUMN Choice LONG NOT NULL;"
CurrentProject.Connection.Execute strSQL

I doubt that query will execute through the query interface, since Access
natively uses DAO.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Reanie" wrote in message
...
I need to write a single SQL statement to alter the Required property of a
Long Integer Table Field (Column) from Yes to No.

I know how to do it in VBA, but this isn't an option in this case.

Thanx

Reanie




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Property in Sql statment yaya Database Design 3 November 13th, 2005 02:40 PM
Required Property Message abc General Discussion 0 November 1st, 2005 03:02 PM
SQL Query...HELP REQUIRED! AQ Running & Setting Up Queries 1 April 26th, 2005 03:18 PM
Unable to insert record to Access via SQL from an ASP page Norman Yuan General Discussion 1 February 2nd, 2005 08:23 PM
multiple sql statements in OLE DB command Jerry Nettleton Running & Setting Up Queries 2 June 18th, 2004 04:58 AM


All times are GMT +1. The time now is 12:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.