473,322 Members | 1,911 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,322 software developers and data experts.

appending error

Hi, I recently appended some data from the excel sheet to database in Microsoft access. It did append all the data however, the auto increment column of the table increase (jumped) to huge number. Instead of having ST121, it appeared ST4832 in the existing table. Can you please tell me the reason behind it? Now when I add data the primary key column is ST4833 although I delete the appended data.

Thank you so much.
Jun 25 '14 #1
5 1143
twinnyfo
3,653 Expert Mod 2GB
Your autonumber field will always start at the next highest value, even if you delete the appended records.

Your autonumber may be reset, by compacting the database (must be the database where the table reside--no linked tables).
Jun 25 '14 #2
Thank you for replying @Twinnyfo. Actually, my table is linked with 6 other tables so resetting auto number will be pain in neck. Isn't there any other alternative way? I am in huge trouble.
Jun 27 '14 #3
Rabbit
12,516 Expert Mod 8TB
Do you have a bunch of blank records? Importing from Excel tends to also import a bunch of blank rows because it's really bad at knowing where the data ends.
Jun 27 '14 #4
twinnyfo
3,653 Expert Mod 2GB
Molly,

My first question is, "Is there a particular reason why the records can't start at ST4833 instead of ST121?" I know from personal experience, as a well-practiced OCD-er, that this would probably drive me nuts, also. However, a record number is a record number--that's all. The auto-number is used as an index to recognize unique records in the system, and nothing else.

Second, if there is a specific reason why the records must be sequential, then having the your record number be part of an auto-number sequence is ill-advised, because any deleted records will leave a gap in the auto-number sequence. Determine another method for calculating out the next sequential Record. This may require some thinking about how to do that, especially if it have letters and numbers (not to mention what would happen, based on your current convention when the number goes to ST1000 from ST999). All this can be done, and probably rather easily.

However, in order for us to effectively guide you to a solution, we would need some additional information.

BTW, based on your post, so far, I do not believe you are in "huge trouble"...

:-)
Jun 28 '14 #5
NeoPa
32,556 Expert Mod 16PB
@Molly.

Your explanation indicates you have an AutoNumber issue but also that your index values contain text. These can't both be true. Please explain your situation more clearly to avoid much wasted time and effort.

I'm only not deleting the question as many have already got involved. The necessary quality of a question here on Bytes.com is a deal higher than this.
Jun 28 '14 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: bucket79 | last post by:
Hi is there anyway appending to dictionary? list has this feature >>>a = >>>a.append(1) >>>print a but dictionary can't
1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
16
by: Michael | last post by:
I have a data application in a2k that I need to create two fixed width text files and then combine them to a single file The first file is header information and the second is transaction data. ...
2
by: Shaurya Vardhan | last post by:
Hi, On Appending a child in XML Node, I am having error, "Run-time exception thrown : System.ArgumentException - The node to be inserted is from a different document context." How to resolve...
39
by: ferrad | last post by:
I am trying to open a file for appending. ie. if the file exists, open it for appending, if not, create it. I am getting back a NULL pointer, and do not know why. Here is my code: FILE...
2
by: kbperry | last post by:
Hi all, I am getting an error message when trying to use the P4 print command via the python api for perforce. Anytime that I run p4c.run("print","-q", eachFile), I keep getting an error...
6
by: MLH | last post by:
I have a query (SQL below) that operates on values entered by users into an unbound form to append a record to tblAdmin. I do not under- stand the basis for the error. There are some 17 or so data...
0
by: cybersurfer | last post by:
Hi I am having a problem with appending one image to another in C# using the ImageAdmin.ocx control. The Append function call requires that 5 arguments be passed. Append ( System.String source ,...
0
by: rkgarimella9 | last post by:
Hi All, I'm encountering with an error countinously whenver i'm trying to Add an Web Reference to my Windows Application. The details are as follows:- Unable to download following files from...
0
by: Hema Suresh | last post by:
Hi all I am trying to create a database using vb6 and excel I created few controls on the vb form and coded to get the details from the user I code in the way to pass the data which i got from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.