473,396 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

inserting data into an autonumber column

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
5 2383
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
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
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
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
thanks for the help guys, all sorted now!

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Baker | last post by:
Hi: Having a little problem here. I am importing data from Excel, using a macro, and importing it into a previously defined table. I wish to immediately add a transaction number to each record,...
1
by: Mike Wiseley | last post by:
You can create a query in the SQL view that adds a new column to a table. For example, to add a new text field named X10, you use the following language: Alter Table MyTargetTable1 Add Column...
3
by: Chris Dixon | last post by:
I am using a SQL Server 7 databaes with an Access 2000 front-end. I have a form where after the user inserts a record the screen refreshes to display a completely different record (without any...
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
15
by: Marcus | last post by:
I created a VB.Net 1.1 application that iterates through all the tables in any basic Access 2000 database passed to it and generates the same table structure in a SQL Server Express database. The...
6
by: Steve | last post by:
I realize that this probably isn't a best practice, but I'm working with legacy code that has a query stored in one column of a table. Because the queries vary, the JSP page that selects a query...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
4
by: lamkelf | last post by:
Hi all, I have found solution for previous Access versions (i.e. compacting database) but it doesn't work with the 2003 version. Can someone point me to a website or give me some hints. ...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.