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 / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

How do I do Identity Insert in Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 20 Nov 2005 00:46 GMT
I have an Access table with an AutoNumber that I want to have a '0' value.

In SQL Server I can do an "Identity Insert" to override a column's Identity
(autonumber) property.

How can I do this in Access 2003.


Mr B - 20 Nov 2005 01:49 GMT
Dave,

You cannot override the AutoNumber of Access as you describe. You also
cannot have a zero value in the auto number.

Signature

HTH

Mr B

> I have an Access table with an AutoNumber that I want to have a '0' value.
>
[quoted text clipped - 4 lines]
>
>  
MacDermott - 20 Nov 2005 01:58 GMT
I beg your pardon!
I am admittedly operating in Access 2000, but I'd be mighty surprised if
this has changed.
  I have a table named MyTable, with an AutoNumber field named ID.
Executing this inserts a row with a value of 0 in ID:
   INSERT INTO MyTable (ID) VALUES (0)

> Dave,
>
[quoted text clipped - 7 lines]
> >
> > How can I do this in Access 2003.
Arvin Meyer [MVP] - 20 Nov 2005 02:56 GMT
> I beg your pardon!
> I am admittedly operating in Access 2000, but I'd be mighty surprised if
> this has changed.
>    I have a table named MyTable, with an AutoNumber field named ID.
> Executing this inserts a row with a value of 0 in ID:
>     INSERT INTO MyTable (ID) VALUES (0)

Correct, you can insert any long integer into an autonumber field in an
empty Access table if the field is a unique index. The table can have any
value inserted in an autonumber field if it is not a unique index (a rare
occurance, but possible).
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
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.