By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

inserting data into an autonumber column

P: n/a
I'm trying to copy a table and its structure from DBase into Access.

One of the fields is a primary key and contains numbers from 0 to 20000
and then from 30000 to 40000. How can I make this column in access an
autonumber? Because the data is already set to a 'text' field, access
wont allow me to change it to an 'autonumber field'.

Any suggestions much appreciated as im ready to tear my hear out!!
cheers

jon.

Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Create the table in Access, with the AutoNumber field.

Then use an Append query statement (Append on Query menu in query design) to
populate the table. You can populate an AutoNumber field using an append
query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jonhanks" <jo********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I'm trying to copy a table and its structure from DBase into Access.

One of the fields is a primary key and contains numbers from 0 to 20000
and then from 30000 to 40000. How can I make this column in access an
autonumber? Because the data is already set to a 'text' field, access
wont allow me to change it to an 'autonumber field'.

Any suggestions much appreciated as im ready to tear my hear out!!
cheers

jon

Nov 13 '05 #2

P: n/a
thanks for the help

I've tried using an append query but comes up with 'you are about to
append 0 rows'. In the query I have a field in one table with the data,
and another field from a new table with an empty autonumber field which
i want to append to. Any ideas?

cheers

jon

Nov 13 '05 #3

P: n/a
MA

"jonhanks" <jo********@hotmail.com> ha scritto nel messaggio
news:11*********************@f14g2000cwb.googlegro ups.com...
thanks for the help

I've tried using an append query but comes up with 'you are about to
append 0 rows'. In the query I have a field in one table with the data,
and another field from a new table with an empty autonumber field which
i want to append to. Any ideas?

cheers

jon

To force an autonumber field you can use
Update ... values

So create an new table and force the insert.
MAssimiliano
Nov 13 '05 #4

P: n/a
If it is appending 0 rows, then you have no data that matches your criteria.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jonhanks" <jo********@hotmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
thanks for the help

I've tried using an append query but comes up with 'you are about to
append 0 rows'. In the query I have a field in one table with the data,
and another field from a new table with an empty autonumber field which
i want to append to. Any ideas?

cheers

jon

Nov 13 '05 #5

P: n/a
thanks for the help guys, all sorted now!

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.