Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / September 2007

Tip: Looking for answers? Try searching our database.

Change autonumber field to number field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paulkaye - 04 Sep 2007 13:22 GMT
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
Wolfgang Kais - 04 Sep 2007 14:05 GMT
Hello Paul.

> 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:
[quoted text clipped - 7 lines]
> 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.

Signature

Regards,
Wolfgang

Pieter Wijnen - 04 Sep 2007 16:47 GMT
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

> Hello Paul.
>
[quoted text clipped - 14 lines]
> The effect if that will be that the numbers are no longer
> automatically assigned.
Wolfgang Kais - 05 Sep 2007 14:27 GMT
Hello Pieter.

Paul asked for the opposite direction.
HTH.

Signature

Regards,
Wolfgang

> Also you can't change the field direct
> Create a new Table (same struct w/o autofield)
[quoted text clipped - 23 lines]
>> The effect if that will be that the numbers are no longer
>> automatically assigned.
Pieter Wijnen - 05 Sep 2007 20:26 GMT
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

> Hello Pieter.
>
[quoted text clipped - 28 lines]
>>> The effect if that will be that the numbers are no longer
>>> automatically assigned.
Wolfgang Kais - 05 Sep 2007 22:44 GMT
Hello Pieter.

> 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),
[quoted text clipped - 3 lines]
> 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.

Signature

Regards,
Wolfgang

>> Hello Pieter.
>>
[quoted text clipped - 28 lines]
>>>> The effect if that will be that the numbers are no longer
>>>> automatically assigned.
paulkaye - 19 Sep 2007 10:33 GMT
> Hello Pieter.
>
[quoted text clipped - 59 lines]
> >>>> Regards,
> >>>> Wolfgang

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
Larry Daugherty - 04 Sep 2007 21:31 GMT
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
Signature

-Larry-
--

> 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:
[quoted text clipped - 11 lines]
>
> Paul
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.