Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Column Type

Status
Not open for further replies.

math20

MIS
Jul 7, 2005
71
CA
Hi,

I am trying to alter column type by using the following code:

DoCmd.RunSQL "ALTER TABLE DATA-SP-09 COLUMN AIR MILES Collector #/ Numéro d’adhérent AIR MILES TEXT"

It is giving me a syntax error, I believe it is because of the table name and column name which I can not modify is there any way I can still use this code to change the field type. There are more than one field/column type I have to change.

Thank you in advance for your help.
 
Use square brackets around field or table names that Access may have trouble interpreting...

Things that are keywords like NAME.
Things that are Delimeters like #, ", '
Things that are punction or syntax , ;
Things that contain white space like a space.

That's everything off the top of my head... but you are definitely in that realm. Also you can optionally use square brackets, so when in doubt, throw them int.
 
Hi lameid,

It worked. Thank you so much.You are great. Have a Nice day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top