Changing an AutoIncrement Field to a Long Integer Field and Back


D

Don

I realize this is a bit unorthodox and reflects a questionable table design,
but I am coming in on the end of this saga.......

We need to massage a small set of data to get to coincide with an old
system. In short, the new system uses an AutoIncrement field to assign an
order number. However, for tracking purposes, we need to ender some orders
from our old system. These old orders already have an order number.

In the table design, can I change the AutoIncrement field into a Long
Integer field, get my old data and set the order numbers accordingly, then
convert the field back to AutoIncrement? Key thing is that the change to
AutoIncrement does not renumber the orders -- will it do that? Once the old
orders are in the system, AutoIncrementing will be fine.

Thanks!

Don
 
Ad

Advertisements

A

Allen Browne

You can turn an AutoNumber into a Long, but then you cannot go back to
AutoNum again.

If you just want to add some numbers that are not already in the table, you
can do that with an Append query, even while the field remains an AutoNum.
 
G

Guest

I had to do a similar thing once. I created an autonumber column and a second
column called 'old number'. If the 'old number' column is null, the
autonumber column is the order number otherwise its the 'old number' column.

Obviously this causes problems with queries on the number but it's the only
solution I found for keeping the old numbers.

-Dorian
 
Ad

Advertisements

D

Don

Thanks everyone!

I think I will use Allen's append query concept as a base to address the
issue.

Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top