ALTER TABLE column field type from TEXT to NUMBER

chris-uk-lad

Registered User.
Local time
Today, 07:44
Joined
Jul 8, 2008
Messages
271
Hi all,
I have a problem with a table ive linked to / selected contents into a copy of said table. The field type of one of my columns changes to text (shows as text on the link dispite being a number). Ive tried converting said column to a number column using the following command but to no avail.

Code:
ObjConn.Execute "ALTER TABLE tblALLOC ALTER COLUMN PAL01 Number (Long Integer)"

Any suggestions as to what i need to do?
Many Thanks
 
I suspect you have an alpha character in the field, therfore you cannot convert that value to a numeric, hence you cannot convert the column.
 
1. You wouldn't be able to convert the column if you have the table open at all (or someone else does).

2. What is the purpose of doing this via code and not manually?
 

Users who are viewing this thread

Back
Top Bottom