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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change field data type from number to text 1

Status
Not open for further replies.

surfbum3000

Technical User
Aug 22, 2003
156
US
I need to change the field data type in a table from number to text.
 
Use the following code in the SQL section of the query to change the ID field in the table tblName from number to text:

ALTER TABLE tblName
ALTER COLUMN ID text
 
From the help of Access VBA

The Microsoft Jet database engine does not support the use of ALTER TABLE, or any of the data definition language (DDL) statements, with non-Microsoft Jet databases


I would open the table and change the field type by selecting the Text data type!(save the change)

If it is VBA then...
CurrentDB.Execute "ALTER TABLE tblName ALTER COLUMN YourField CHAR"

or (MS-Access 2000+)

CurrentProject.Connection.Execute "ALTER TABLE tblName ALTER COLUMN YourField CHAR"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top