A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Temporarily switch off records autonumbering, then restore records autonumbering.



 
 
Thread Tools Display Modes
  #1  
Old April 11th, 2005, 12:03 AM
Joe M
external usenet poster
 
Posts: n/a
Default Temporarily switch off records autonumbering, then restore records autonumbering.

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


  #2  
Old April 11th, 2005, 12:27 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

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.

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



"Joe M" huytuandottpgdotcomdotau wrote in message
...
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




  #3  
Old April 11th, 2005, 01:53 AM
Joe M
external usenet poster
 
Posts: n/a
Default

Thanks Douglas, can you please give me the coding examples of APPEND/INSERT
records from the second table to the original tables. Thanks.

"Douglas J. Steele" wrote in message
...
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.

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



"Joe M" huytuandottpgdotcomdotau wrote in message
...
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






  #4  
Old April 11th, 2005, 02:25 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Mon, 11 Apr 2005 10:53:36 +1000, "Joe M" huytuandottpgdotcomdotau
wrote:

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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attn Sprinks- Not duplicate insert records babs Using Forms 1 December 13th, 2004 06:25 PM
Unique Values vs Unique Records Miaplacidus Running & Setting Up Queries 1 September 17th, 2004 08:24 PM
deleting records sam Running & Setting Up Queries 3 September 15th, 2004 12:58 PM
How to count the total records on a particular page Irshad Alam Setting Up & Running Reports 1 September 2nd, 2004 02:05 PM


All times are GMT +1. The time now is 12:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.