Question : Changing a field type while using INTO

I am attempting to create a table called TempSentList that contains a list of people who belong to selected mail list(s). The mail list names are selected from an unbound list (that is the "criteria" reference in the code below).

Everything is looking good so far, except that I receive the following error:

Run-Time Error: 3090
Resultant table not allowed to have more than one AutoNumber field.

This is due to the fact that both the [Mail List].ID and the People.ID fields are AutoNumber.

Question: How can I convert one or both of these AutoNumber fields to a Number or even Text field in the process of creating this TempSentList table?

Thanks!




strSQL = "SELECT DISTINCTROW [Mail List].[Mail List], [Mail List].ID, [Mail List].Inactive, " & _
"People.ID, People.Last, People.First, People.Company, True As Selected, 1 as Copies " & _
"INTO TempSentList FROM [Mail List] LEFT JOIN [People] ON [Mail List].ID = People.ID " & _
"WHERE ((([Mail List].[Mail List]) = " & Criteria & "))"

Answer : Changing a field type while using INTO

I would just create a result table on forhand (TempSentList ) and use a "DELETE * FROM TempSentList;" followed by an append query.

When the fields in the TempSentList are defined  as numeric, then you'll have no problems.

Nic;o)
Random Solutions  
 
programming4us programming4us