Number to AutoNumber Data Type in a table containing data

A

Adrian

Hi Group!

I have an ID Field with Number data type and I want to convert it to an
auto-numerical field.... How do I do this right now containing data in draw?

Thanks!
 
A

Allen Browne

Access won't allow you to change the field into the AutoNumber, but there is
a workaround.

1. Select the table in the database window, copy (Ctrl+C) and paste
(Ctrl+V).
Access gives you a dialog where you can ask for Structure Only, and give a
new name.

2. Open the new table in design view.
Delete the Number field. Save.
Add an AutoNumber field, using the same name if desired. Save. Close.

3. Create a query into the original table.
Change it to an Append query (Append on Query menu, in query design.)
Access asks what table to append to.
Answer the new table, created in step 2.

4. Run the query.
The new table now has an autonumber field, populated with the values from
the Number field.
 
A

adsl

Adrian said:
Hi Group!

I have an ID Field with Number data type and I want to convert it to an
auto-numerical field.... How do I do this right now containing data in
draw?

Thanks!
 
A

adsl

Allen Browne said:
Access won't allow you to change the field into the AutoNumber, but there
is a workaround.

1. Select the table in the database window, copy (Ctrl+C) and paste
(Ctrl+V).
Access gives you a dialog where you can ask for Structure Only, and give a
new name.

2. Open the new table in design view.
Delete the Number field. Save.
Add an AutoNumber field, using the same name if desired. Save. Close.

3. Create a query into the original table.
Change it to an Append query (Append on Query menu, in query design.)
Access asks what table to append to.
Answer the new table, created in step 2.

4. Run the query.
The new table now has an autonumber field, populated with the values from
the Number field.
 
A

adsl

Allen Browne said:
Access won't allow you to change the field into the AutoNumber, but there
is a workaround.

1. Select the table in the database window, copy (Ctrl+C) and paste
(Ctrl+V).
Access gives you a dialog where you can ask for Structure Only, and give a
new name.

2. Open the new table in design view.
Delete the Number field. Save.
Add an AutoNumber field, using the same name if desired. Save. Close.

3. Create a query into the original table.
Change it to an Append query (Append on Query menu, in query design.)
Access asks what table to append to.
Answer the new table, created in step 2.

4. Run the query.
The new table now has an autonumber field, populated with the values from
the Number field.
 
A

adsl

Adrian said:
Hi Group!

I have an ID Field with Number data type and I want to convert it to an
auto-numerical field.... How do I do this right now containing data in
draw?

Thanks!
 
A

adsl

Allen Browne said:
Access won't allow you to change the field into the AutoNumber, but there
is a workaround.

1. Select the table in the database window, copy (Ctrl+C) and paste
(Ctrl+V).
Access gives you a dialog where you can ask for Structure Only, and give a
new name.

2. Open the new table in design view.
Delete the Number field. Save.
Add an AutoNumber field, using the same name if desired. Save. Close.

3. Create a query into the original table.
Change it to an Append query (Append on Query menu, in query design.)
Access asks what table to append to.
Answer the new table, created in step 2.

4. Run the query.
The new table now has an autonumber field, populated with the values from
the Number field.
 
A

adsl

Adrian said:
Hi Group!

I have an ID Field with Number data type and I want to convert it to an
auto-numerical field.... How do I do this right now containing data in
draw?

Thanks!
 
Top