PC Review


Reply
Thread Tools Rate Thread

Append query - Append to table with Autonumber field

 
 
Boon
Guest
Posts: n/a
 
      29th Jun 2009
Hello,

I have a table named "A". Table "A" has 3 fields, the first field is
Autonumber.

I have 2 queries, first one is the query that delete data in table "A".
Another query will append data into Table A. The second query will append
data into field 2 and field 3. As expected, the field 1 in table "A" is
automatically filled with numbers (autonumber).

The problem is when I run these 2 queries, the number created in table "A"
doesn't start at 1. It seems like it keeps couting from the previous.

How can I make it start it 1 every time I do this? (The field Autonumber is
not mandatory. I can make it as a "NUMBER" field. and use the query that
fills the series when I do the append query. But I don't know how to fill a
series.)

Thanks a lot.
Boon



 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      29th Jun 2009
On Mon, 29 Jun 2009 09:08:49 -0500, "Boon"
<boonyawat.la-(E-Mail Removed)> wrote:

You will get the desired behavior if you delete the records, then
compact the database, then import the data.
But requiring the autonumber fields to be sequential is rarely a good
idea.

-Tom.
Microsoft Access MVP


>Hello,
>
>I have a table named "A". Table "A" has 3 fields, the first field is
>Autonumber.
>
>I have 2 queries, first one is the query that delete data in table "A".
>Another query will append data into Table A. The second query will append
>data into field 2 and field 3. As expected, the field 1 in table "A" is
>automatically filled with numbers (autonumber).
>
>The problem is when I run these 2 queries, the number created in table "A"
>doesn't start at 1. It seems like it keeps couting from the previous.
>
>How can I make it start it 1 every time I do this? (The field Autonumber is
>not mandatory. I can make it as a "NUMBER" field. and use the query that
>fills the series when I do the append query. But I don't know how to fill a
>series.)
>
>Thanks a lot.
>Boon
>
>

 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      29th Jun 2009
You should not care what the number is as it is not for human consumption.

Acouple of things --
- Compact and repair then close and open the database.
- Append a number that no longer exist.

"Boon" wrote:

> Hello,
>
> I have a table named "A". Table "A" has 3 fields, the first field is
> Autonumber.
>
> I have 2 queries, first one is the query that delete data in table "A".
> Another query will append data into Table A. The second query will append
> data into field 2 and field 3. As expected, the field 1 in table "A" is
> automatically filled with numbers (autonumber).
>
> The problem is when I run these 2 queries, the number created in table "A"
> doesn't start at 1. It seems like it keeps couting from the previous.
>
> How can I make it start it 1 every time I do this? (The field Autonumber is
> not mandatory. I can make it as a "NUMBER" field. and use the query that
> fills the series when I do the append query. But I don't know how to fill a
> series.)
>
> Thanks a lot.
> Boon
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
append query to table with autonumber pk Mitchell_Collen via AccessMonster.com Microsoft Access 2 7th Jan 2008 09:16 PM
Append query to change the value of an autonumber field =?Utf-8?B?UmVteQ==?= Microsoft Access Queries 2 21st Jul 2006 11:05 AM
append to new table - autonumber field =?Utf-8?B?c21ib3lk?= Microsoft Access 4 12th Jul 2005 04:40 PM
Append query into a table with an autonumber Stanley Microsoft Access Queries 1 28th Jul 2004 12:45 PM
append query to a table with autonumber Rob Guest Microsoft Access Queries 2 19th Jul 2004 04:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:55 PM.