Change autonumber field to number field

P

paulkaye

Is there a convenient way to change an autonumber field to a number
field? I tried using the table design view but received the error:

"You can't change the data type or field size of this field; it is
part of one or more relationships. If you want to change the data type
of this field, first delete its relationships in the Relationships
window."

If I were to break and remake the relevant relationships, would that
suffice or might there be downstream effects which are not rectified
when the relationships are remade?

Many thanks,

Paul
 
W

Wolfgang Kais

Hello Paul.

paulkaye said:
Is there a convenient way to change an autonumber field to a number
field? I tried using the table design view but received the error:

"You can't change the data type or field size of this field; it is
part of one or more relationships. If you want to change the data
type of this field, first delete its relationships in the
Relationships window."

If I were to break and remake the relevant relationships, would that
suffice or might there be downstream effects which are not rectified
when the relationships are remade?

As long as you are the only one using that database during your
change, there should be no problem changing the data type to number.
The effect if that will be that the numbers are no longer
automatically assigned.
 
P

Pieter Wijnen

Also you can't change the field direct
Create a new Table (same struct w/o autofield)
Add "AutoField" as Long
Append All records

HTH

Pieter
 
L

Larry Daugherty

Not implicitly but no one here knows the dependencies you may have
built into your application. The quickest test would be to make a
copy of your application, make the changes in that copy and
exhaustively test.

HTH
 
W

Wolfgang Kais

Hello Pieter.

Paul asked for the opposite direction.
HTH.

--
Regards,
Wolfgang


"Pieter Wijnen"
Also you can't change the field direct
Create a new Table (same struct w/o autofield)
Add "AutoField" as Long
Append All records

HTH

Pieter
 
P

Pieter Wijnen

He did?
I Read it as I have a AutoNumber Field that I no longer want to be an
AutoNumber.
The Simplest way to achieve the goal (either way) is to duplicate the table
(empty),
Alter the Field.
Append all Records to the New Table
Drop the old Table
Rename the new Table
Additionally recreate any Relationships

Pieter




Wolfgang Kais said:
Hello Pieter.

Paul asked for the opposite direction.
HTH.

--
Regards,
Wolfgang


"Pieter Wijnen"
 
W

Wolfgang Kais

Hello Pieter.

Pieter said:
He did?
I Read it as I have a AutoNumber Field that I no longer want to be an
AutoNumber.

Sorry. You are right.
The Simplest way to achieve the goal (either way) is to duplicate the
table (empty),
Alter the Field.
Append all Records to the New Table
Drop the old Table
Rename the new Table
Additionally recreate any Relationships

Excuse me, you are wrong. Simply change the fieldtype to Number (Long).
When changing long to autonumber, you have to create a new table.
 
P

paulkaye

Hello Pieter.



Sorry. You are right.


Excuse me, you are wrong. Simply change the fieldtype to Number (Long).
When changing long to autonumber, you have to create a new table.

Hi all,

Thanks for your help. I did just remove the dependencies, change the
field type, and then replace the dependencies. So far, everything
looks fine (ish, see my next post!).

Paul
 

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