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 / April 2005

Tip: Looking for answers? Try searching our database.

Temporarily switch off records autonumbering, then restore records autonumbering.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe M - 11 Apr 2005 00:03 GMT
Hi,
   I have a table with the autonumber field. I need to override the
autonumber field and enter some old values. How do I temporarily switch off
the autonumber field for these values. Then restore the autonumbering
functionality after these records are written?? What I need is temporarily
switch off records autonumbering for some values, then restore the record
autonumbering after these values are written. Thanks
Douglas J. Steele - 11 Apr 2005 00:27 GMT
You can't change an autonumber type.

To do what you're trying to do, create a second table that's identical to
your existing table except that it just has a Long Integer field rather than
the Autonumber field. Populate that second table, putting in the desired
numbers in the Long Integer field. Create an Append query (INSERT INTO...)
that takes the values from the second table and puts them into the original
table.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi,
>    I have a table with the autonumber field. I need to override the
[quoted text clipped - 3 lines]
> switch off records autonumbering for some values, then restore the record
> autonumbering after these values are written. Thanks
Joe M - 11 Apr 2005 01:53 GMT
Thanks Douglas, can you please give me the coding examples of APPEND/INSERT
records from the second table to the original tables. Thanks.

> You can't change an autonumber type.
>
[quoted text clipped - 12 lines]
>> temporarily switch off records autonumbering for some values, then
>> restore the record autonumbering after these values are written. Thanks
John Vinson - 11 Apr 2005 02:25 GMT
>Thanks Douglas, can you please give me the coding examples of APPEND/INSERT
>records from the second table to the original tables. Thanks.

No "coding" involved. Simply create a query based on the second table;
use the Query menu option to change it to an Append query. Name the
first table when asked what you want to append to.

                 John W. Vinson[MVP]    
 
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.