Convert AutoNumber to Number (1 Viewer)

Bill Bisco

Custom User Title
Local time
Today, 04:19
Joined
Mar 27, 2009
Messages
92
I have a Make Table Query that has several fields from different Tables. I have two fields that I want in this new table of this that are AutoNumber Fields.

Whenver I try to execute this Make Table Query, I get an error saying "Resultant Table not allowed to have more than one AutoNumber field."

Is there a way to convert this Autonumber Data Type to a Number Data Type before this Make Table Query is Executed?

Sincerely,
Bill
 

HiTechCoach

Well-known member
Local time
Today, 04:19
Joined
Mar 6, 2006
Messages
4,357
Bill,

Yes it is possible to do. Here is how I do it.

In the query used a calculated field with the Clng() to convert the data type.


Example:
MyFieldName: Clng([MyAutoNumberField])

or the SQL

Clng([MyAutoNumberField]) as MyFieldName

NOTE:
I prefer to use an append query to a pre-made table with the correct data types if this is not a one time thing. I find many advantages to this method over a make-table query. I rarely use a make-table query and I export lots of data.
 

Bill Bisco

Custom User Title
Local time
Today, 04:19
Joined
Mar 27, 2009
Messages
92
HiTechCoach,

Thanks for the response and the solution. I have been told that Deleting and then Appending a Table is more efficient, and I wanted to know if it was possible for me to implement it a different way. I may end up doing your suggestion later anyway. :p

Thanks,
Bill
 

Users who are viewing this thread

Top Bottom